Simply declaring a ENUM() makes unreal crash!

I cant understand what is wrong on my side . I was happily coding my class and everything compiles perfectly until i add this simple enum declaration before the uclass()

UENUM(BlueprintType)		//"BlueprintType" is essential to include
enum class EVictoryEnum : uint8
{
	VE_Dance 	UMETA(DisplayName = "Dance"),
	VE_Rain 	UMETA(DisplayName = "Rain"),
	VE_Song	UMETA(DisplayName = "Song")
};

The code compiles without any problem in visual studio . But immediatly afterwards the editor shows the “compiling game” progress everytime until 19% . after a few seconds later the whole editor crashes . I had to restart unreal everytime afterwards .

as you can see its exactly the same snippet as in the unreal doc website . If i take away the enum code and compile then there are no issues nor crashes . Is it a bug on unreal side ? any help is appreciated …

Hi ,

I tried placing this code into a project with a little bit of existing code in it without any crashing. I have a few questions about this problem.

  1. Does this only occur in this one particular project or will it occur in a fresh project as well?
  2. Does the crash only happen on hot reload? Meaning it doesn’t occur if you compile with the editor closed and then open it afterwards.
  3. I know you selected 4.8 for the product version but are you using a hotfix version? If so, which one?
  4. Can you provide me with the callstack from the crash that you get?

Hi ,

We haven’t heard from you in a while. Are you still experiencing this issue? In the meantime, I’ll be setting this question to resolved for tracking purposes. If you wish to continue investigating this issue, please let me know by commenting and the question will reopen.

Have a nice day,

Sorry . Havent checked on the forums until i received the notification on my mail . I’ll answers the questions .

  1. I forgot to mention that i had also inserted

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Enum)
    EVictoryEnum VictoryEnum;

once inserting the above code below public: then it crashes during game compile time exactly at 19%. I tested it in a new third person project template where it still crashed.

Additional Info: It crashes at first try for the third person c++ template . Once i start the editor again and compile then theres no issue anymore and the enum comes in the blueprint . To recreate the crash again i had removed the enum code , saved visual studio and closed VS and the editor . After restarting unreal and adding back the enum code causes the crash during game compile time at 19% .

2 . It happens always in hot reload.

3 . The version is : 4.8.2-2614606+++depot+UE4-Releases+4.8

Thank you for the information. I’m able to reproduce the crash and I’ll be looking into this issue. I’ll let you know as soon as I find out something new.

awesome :smiley: . Feels better that its an engine problem rather than my own.

Hi ,

While I was able to get this to happen in 4.8.3 and 4.9 Preview, I’ve been unable to reproduce this in our latest internal build so this seems to be fixed by a recent change. This fix should make it into the final 4.9 release. Until then I’d suggest avoiding hot reloading when you add enums this way.

Have a nice day,