# PGO for Windows fatal error C1301 

**URL:** <https://forums.unrealengine.com/t/pgo-for-windows-fatal-error-c1301/2718802>\
**Category:** Pipeline & Plugins\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [March 27, 2026, 12:36pm UTC](https://forums.unrealengine.com/t/pgo-for-windows-fatal-error-c1301/2718802 "2026-03-27T12:36:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [March 27, 2026, 12:36pm UTC](https://forums.unrealengine.com/t/pgo-for-windows-fatal-error-c1301/2718802/1 "2026-03-27T12:36:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [March 27, 2026, 12:36pm UTC](https://forums.unrealengine.com/t/pgo-for-windows-fatal-error-c1301/2718802/2 "2026-03-27T12:36:51Z")

</div>

**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)

---

<div class="post-metadata">

**Author:** ![Svegn2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svegn2/32/1225280_2.png) [@Svegn2](https://forums.unrealengine.com/u/Svegn2)\
**Post date:** [March 30, 2026, 6:50pm UTC](https://forums.unrealengine.com/t/pgo-for-windows-fatal-error-c1301/2718802/3 "2026-03-30T18:50:28Z")

</div>

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](https://github.com/EpicGames/UnrealEngine/commit/cd2dfc88c3cec2778881ea6c518783f92434a3d1)

Regards,

Martin

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [March 31, 2026, 9:16am UTC](https://forums.unrealengine.com/t/pgo-for-windows-fatal-error-c1301/2718802/4 "2026-03-31T09:16:06Z")

</div>

Hey Martin!

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