PGO for Windows fatal error C1301

When attempting to make a package with PGO optimize enabled i had the following link error:

Merging <Repository>\Binaries\Win64\<gamename>-Win64-Test!1.pgc

<Repository>\Binaries\Win64\<gamename>-Win64-Test!1.pgc: Used 5.9% (154159136 / 2598260736) of total space reserved. 0.0% of the counts were dropped due to overflow.

fatal error C1301: error accessing program database <Repository>\Binaries\Win64\<gamename>-Win64-Test.pgd, invalid format, please delete and rebuild

LINK : fatal error LNK1257: code generation failed

The repo name and game name have been edited out of course.

This same issues occurs with both test and shipping packages. I followed the procedure described in the steps to reproduce. Have i dont something wrong? why am i receiving these errors?

Steps to Reproduce
Create a package with bPGOProfile=true in the target.cs

Copy the generated .pgd from <gameName>/binaries/Win64 to <gameName>/Platforms/Windows/Build/PGO

Run the package and exit the game to generate a .pgc file

Copy the .pgc file from <package>/<gamename>/Binaries/Win64 to <gameName>/Platforms/Windows/Build/PGO

Attempt to package the game with bPGOOptimize=true in the target.cs (and remove the bPGOProfile)

Hello!

There are 2 known causes for this problem.

  1. The first one is a bug in the MSVC toolchain.
    1. The default for version 5.7 is the 14.44 toolchain and the 22621 Windows SDK. You can install both from the VS Installer.
  2. A bug in UBA
    1. launch UBT with -noUBA
    2. When running UAT\BuildCookRun, you can add -UBTArgs=-noUBA

The bug in UBA was resolved in the main stream and the fix will be part of version 5.8. CL50726310 \ GH commit

Regards,

Martin

Hey Martin!

Seems the issue was indeed caused by UBA, running without it fixed the issues. Hope this thread helps others too