(Blueprint) User defined enum in 4.9 getting corrupted

I believe there is a severe underlying issue in 4.9 regarding user defined enums in blueprint. I had posted a previous bug report (Local variable crash in 4.9 - Programming & Scripting - Epic Developer Community Forums) about a user defined struct that contained a user defined enum causing crashes in the editor, and now I have found that in 4.9 my enums are actually getting corrupted.

In 4.9p2:

  • Create a new Blueprint Enum, named whatever
  • In that enum add three entries titled, “First”, “Second”, and “Last”
  • Create a new Agent based Blueprint
  • In that new blueprint, add an editable variable that contains the new enum
  • In the Event Graph for that agent, add a simple print of the enum variable’s value to the Begin Play event
  • Add that blueprint actor to an empty level
  • Note in 4.9 the default value of the enum appears to be None whereas in 4.8 it is the first value
  • Set the actor’s enum value to “First”
  • Run the game
  • Note In 4.9p2 this test consistently printed out the enum having a value of “Second” despite it being set to “First”.

In 4.8.2:

  • Repeat the steps above, but note that in 4.8 the enum value in the actor defaults to the “First” entry
  • Note also that the enum prints out the proper value of “First” when you play the game

Hi John,

Thank you for the report. I was able to reproduce the issue in the 4.9 Preview 2 version, so I’ve entered it as JIRA UE-19849 in our trafcking software. The developers will be investigating it further and we will post here with updates as we have them.

Cheers,

TJ

Yeah, I have it in the description and the repro steps for the JIRA that it is referring to the ‘Default Value’ that you set in the variable. Any value set there is not pulled properly.

Hi TJ

I see the issue in the 4.9 preview “Known Issues” list as: “UE-19849 Enum Variable doesn’t pull the correct Default Value” and I just wanted to verify that you have reproduced and are aware that the issue is more than just the default value, but rather any value that is set is not retrieved properly.

I am getting the same problem with enums, in the version 4.9.0:

Ack that isn’t good, especially since this bug was called out as being fixed in Preview 4. I never got around to testing it though :frowning: Hopefully a hotfix will address this fast because this is a pretty critical bug.

I hope it too, because the version 4.9 came with some interesting improvements on AI.

This has been reported a lot lately. Ben Halliday (Staff) has been tracking the complaints here recently, says he has filed another bug report and when I posted my issue he referred me to this link as he will update that answer as he gets more details:

In a comment he made earlier today regarding someone else asking about a hotfix, this was his reply:

These sorts of bugs take time, so I
wouldn’t expect a fix to be
implemented for 4.9.

Hot fixes are reserved for editor
crashing bugs and the like. It’s
always possible that something will be
added to a hotfix if it’s a simple
enough adjustment and the developers
are able to sneak it in, but that’s
not common.

This bug is more severe though. Your bug is casting which is bad, but you don’t need to cast the enum for it to be wrong. It is corrupted internally and can even cause editor crashes. This bug completely cripples the use of Enums in BP and possibly even in code, and can under the right conditions cause the editor to crash as seen here: Local variable crash in 4.9 - Programming & Scripting - Epic Developer Community Forums

Like I said its odd that the bug would still be present after Epic stated it was fixed, but if it is still there I hope they pounce on it because it is a significant issue. Maybe not a “hotfix” but at least a priority for 4.9.1

Hi John,

The issue that Invius is experiencing is a bit different that your original issue and it’s being investigated in the link that jtsmith provided.

I tested your original issue again in the official 4.9 release and it is working properly.