[5.7] Determinism issues with world partition loading package during cook

Hello :slight_smile:

I’m investigating an issue with some of our skeleton assets changing from cook to cook, by doing a binary diff i noticed the DefaultSubgroup was once present, and not the second time, i added a callstack trace where this property could change during the cook, and catch it to be there

[Image Removed]

after investigating a bit, realized the property was getting changed there

[Image Removed]

that’s what lead me to think about this fix for the issue

[Image Removed]

I’m clearly lacking knowledge about the engine in depth, but that seems like a good thing to do since the world partition could load packages, now if you’re thinking about potential issues, or you have a better advise, i’m open for it :slight_smile:

[Attachment Removed]

Yes, that change is a good fix and will not cause problems.

I will add the modification of that flag around all of the CookPackageSplitterInstance calls.

We plan to remove GIsCookerLoadingPackage and replace it with IsRunningCookCommandlet, but I will make that change separately.

[Attachment Removed]

Thanks for the confirmation :slight_smile: i will update the other code paths as well, i indeed didn’t check if there is more :slight_smile:

[Attachment Removed]

Submitted into UE5.8 in CL 52655836, aka github commit 42cee0adb71add0cfd27f86eb33727e00ce70adf

> Cooker: CookPackageSplitter: Set the GCookerIsLoadingPackage variable to true when calling CookPackageSplitter functions…

[Attachment Removed]

Thanks :slight_smile:

[Attachment Removed]