Maps with Enum Keys Crash

  1. Created an enum in C++, compiled and ran in DebugGame Editor.
  2. Created a Blueprint in the editor and added a new variable to it.
  3. Selected my enum, made the variable a Map and selected Integer as the value, so it is an Map variable in my Blueprint.
  4. I then populated this Map variable with two elements.
  5. Compiled and saved the Blueprint, then closed down the editor.
  6. I then did a full rebuild of my C++ code and ran again in DebugGame Editor.
  7. Double clicked on my Blueprint and the editor crashes.

According to the error report it looks like it is crashing when trying to read the default values of the enum keys for the Map. Here is a snippet from the error report.

Assertion failed: Enum [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\EnumProperty.cpp] [Line: 70] 

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_CoreUObject!UEnumProperty::SerializeItem() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\enumproperty.cpp:72]
UE4Editor_CoreUObject!UMapProperty::SerializeItem() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\propertymap.cpp:313]
UE4Editor_CoreUObject!FPropertyTag::SerializeTaggedProperty() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\propertytag.cpp:180]
UE4Editor_CoreUObject!UStruct::SerializeTaggedProperties() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:1105]
UE4Editor_CoreUObject!UClass::SerializeDefaultObject() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:3708]
UE4Editor_Engine!UBlueprintGeneratedClass::SerializeDefaultObject() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\blueprintgeneratedclass.cpp:286]

Very annoyed as I have now lost a rather large Blueprint due to this bug! I have no idea how to recover my Blueprint.

This might be a duplicate of:

https://answers.unrealengine.com/questions/574277/uenum-from-uint8-has-no-hash-function.html

Ah yes, you are right. Although I see the bug report for it has been marked as “Won’t Fix” which is sad.

Hi wilberolive,

Sorry for the delay in responding to your post. I checked the ticket that had been entered for the other post, and it was marked as Won’t Fix because it was a duplicate of another ticket. The other ticket has been marked as fixed, so I ran through the repro steps in the duplicate to make sure it was resolved as well, and it looks like the crash that you described is no longer happening.

Do you still experience a crash in this instance in the 4.16 Preview?

Similar problem at launch (4.16)

Assertion failed: Enum [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\EnumProperty.cpp] [Line: 325]

in 4.15.3

LogPlayLevel: GameMechanics: [2017.06.01-16.21.00:934][  0]LogWindows:Error: === Critical error: ===LogWindows:Error:
LogPlayLevel: GameMechanics:
LogPlayLevel: GameMechanics: [2017.06.01-16.21.00:934][  0]LogWindows:Error: LogWindows:Error: Assertion failed: Enum [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\EnumProperty.cpp] [Line: 319]
LogPlayLevel: GameMechanics:
LogPlayLevel: GameMechanics: [2017.06.01-16.21.00:934][  0]LogWindows:Error: Assertion failed: Enum [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\EnumProperty.cpp] [Line: 319] LogWindows:Error:
LogPlayLevel: GameMechanics:
LogPlayLevel: GameMechanics: [2017.06.01-16.21.00:934][  0]LogWindows:Error: LogWindows:Error:
LogPlayLevel: GameMechanics:
LogPlayLevel: GameMechanics: [2017.06.01-16.21.00:934][  0]LogWindows:Error: LogWindows:Error:
LogPlayLevel: GameMechanics:
LogPlayLevel: GameMechanics: [2017.06.01-16.21.00:934][  0]LogWindows:Error: LogWindows:Error: 0x00000000E0503C58
LogPlayLevel: GameMechanics:
LogPlayLevel: GameMechanics: [2017.06.01-16.21.00:934][  0]LogWindows:Error: 0x00000000E0503C58LogWindows:Error: 0x0000000056F86000
LogPlayLevel: GameMechanics:
LogPlayLevel: GameMechanics: [2017.06.01-16.21.00:934][  0]LogWindows:Error: 0x0000000056F86000LogWindows:Error: 0x0000000000000400

Hi,

I just wanted to check and see if you are still experiencing this issue. I tried to reproduce this in 4.18, and was able to open the Blueprint that contained the enum Map variable without seeing a crash.