Cooker is asserting in Class.h on UE 5.7.1

In UE 5.7 there were some changes to how Enum member names are stored. This change introduces an assert when cooking using the Editor Debug executable. Cooking any map using the debug executable will asset shortly after the cooker commandlet starts up.

The flow leading to the asset is as follows:

UObject::DeclareCustomVersions calls CDO->Serialize() and UEnum::Serialize() calls AddNamesToPrimaryList() which calls Names.GetNames() which will hit the checkfSlow assert (in Class.h) since TaggedNames is nullptr (and it should not be here).

My fix was to add the following at the top of Enum::AddNamesToPrimaryList() to skip any CDO Enums (since they won’t have any enumeration members anyway).

void UEnum::AddNamesToPrimaryList()

{

if (HasAnyFlags(RF_ClassDefaultObject))

{

return;

}

FWriteScopeLock ScopeLock(AllEnumNamesLock);

[Attachment Removed]

Steps to Reproduce
Cook any map for the QAGame project using an Debug Editor executable. Notice that it will assert at UEnum::FNameData::GetNames in Class.h

[Attachment Removed]

Hello,

Thanks for reporting the problem. I filled an internal bug report so the team can address the problem. You should soon be able to follow its resolution here: Unreal Engine Issues and Bug Tracker (UE\-358577)

Regards,

Martin

[Attachment Removed]