Why is my Blueprint causing the Editor to freeze and crash?

So I have a Blueprint that had a variable that stored the current state as an int. I have a level open right now that has this Blueprint located in it. I created an enumeration to better represent the different states. Once I went back to my BP and changed the variable type to that enumeration and hit ‘Compile’, it froze for 5 minutes then provided me with the following crash log… hope this helps

Assertion failed: Names.IsValidIndex(NameIndex) [File:E:\Source\UnrealEngine-4.4.0-release\Engine\Source\Runtime\CoreUObject\Private\UObject\Enum.cpp] [Line: 350]

Stack:
FWindowsPlatformStackWalk::StackWalkAndDump() 0x89545bb6 + 0 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:177] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-Core.dll]
FDebug::AssertFailed() 0x893e4535 + 0 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\runtime\core\private\misc\outputdevice.cpp:203] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-Core.dll]
UEnum::HasMetaData() 0x909e0143 + 0 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\runtime\coreuobject\private\uobject\enum.cpp:351] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-CoreUObject.dll]
UEnum::GetDisplayNameText() 0x909d1972 + 0 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\runtime\coreuobject\private\uobject\enum.cpp:287] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-CoreUObject.dll]
FPropertyValueImpl::GetPropertyValueString() 0x838f1405 + 18 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\editor\propertyeditor\private\propertyhandleimpl.cpp:73] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
FPropertyValueImpl::GetValueAsDisplayString() 0x83905cb1 + 14 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\editor\propertyeditor\private\propertyhandleimpl.cpp:603] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
FPropertyEditor::GetValueAsDisplayString() 0x83905bc4 + 53 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\editor\propertyeditor\private\presentation\propertyeditor\propertyeditor.cpp:121] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
SPropertyEditorCombo::GetDisplayValueAsString() 0x838e4d9f + 69 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\editor\propertyeditor\private\userinterface\propertyeditor\spropertyeditorcombo.cpp:110] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
TBaseSPMethodDelegateInstance_RetVal_NoParams_Const::Execute() 0x838bc486 + 17 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\runtime\core\public\delegates\delegateinstancesimpl.inl:161] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
TBaseDelegate_RetVal_NoParams::Execute() 0x838b6aaa + 6 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:1058] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
SPropertyComboBox::Construct() 0x83872364 + 46 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\editor\propertyeditor\private\userinterface\propertyeditor\spropertycombobox.cpp:17] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
TDecl::operator<<=() 0x83837d8a + 0 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\runtime\slatecore\public\widgets\declarativesyntaxsupport.h:1250] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
SPropertyEditorCombo::Construct() 0x83876626 + 873 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\editor\propertyeditor\private\userinterface\propertyeditor\spropertyeditorcombo.cpp:83] [in E:\Source\UnrealEngine-4.4.0-release\Engine\Binaries\Win64\UE4Editor-PropertyEditor.dll]
TDecl > >::operator<<=() 0x8383856e + 0 bytes [File=e:\source\unrealengine-4.4.0-release\engine\source\runtime\slatecore\public\widgets\declarativesyntaxsupport.h:1250] [in E:\Source\Unre

Okay, so upon returning into my project, I’m getting the following warning. I think this bug is related to how the engine handles converting default values. I’ll go ahead and delete this and re-create it.

Warning Default Enum value ‘Current State’ for class ‘MainMenu_C’ is invalid in object ‘Default__MainMenu_C’

So I tried deleting it and re-creating it but it didn’t fix it. I am guessing it is because my enumeration display names have spaces in them but there was no validation requesting me to do otherwise. As a note, these enumerations were created in the editor and not in code. I may just step away for the night because all the constant crashing in the engine is causing a lot of headaches but I’m going to try to stay positive here and thanks for any assistance. Take care guys!

,

Were you able to reproduce this in a clean project with no additional content? Can you post the crash logs from the most recent crash here so I can take a look? What steps did you take before the crash occurred? Cheers.

Hey ! No, but I’d be more than glad to try that. I’ll create a new project and migrate the enumeration and the MainMenu BP over to it and give it a shot. You can see above at the beginning of the post the steps I was taking at the moment of the crash. But I’ll try out today to create a new project and just re-create so I can have a list of STRs for you to reproduce. Thanks for helping out!

Hi , I have an update. I went back to try and re-compile it and it no longer crashes but produces the warning I posted above "Warning Default Enum value ‘Current State’ for class ‘MainMenu_C’ is invalid in object ‘Default__MainMenu_C’ "

However, I fixed it. So to recap, what initially happened was that the variable was created in my Blueprint and was an int and meant to store the index of a given state. I then created an Enumeration (in the editor, not code) to better represent these states instead of an index and switched the type on that variable.

On clicking ‘Compile’, it crashed with the crash log above. It only did this once but upon going back into the engine, it was defaulting the Default Value of the problematic variable to the first index in the enumeration I created. Still clicking ‘Compile’ did not fix it as it still threw the warning above.

In order for me to fix this, what I did was click the ComboBox to set the default value, switch it to another state, then back to the original one and then after clicking ‘Compile’, it was successful.

I did try to go and create a brand new project and tried to emulate the same set of steps except for setting any names in the Enumerators for the Enumeration (kept default names in enum but added two entries), but when I clicked ‘Compile’, it worked.

That’s great news for me but I wish I had a much better way to replicate the issue so you guys could take a look at it. If I notice anything further, I’ll keep you and the team posted.

,

I’m happy to hear you were able to solve your crash. If this continues to occur please post back here with updated logs and repro steps. For now I will mark this question as answered for tracking purposes.