Enum EComparisonMethod in struct leads to assertion failed

Hello Quexlaw,

This is likely intended behavior, as this particular enum is declared in FunctionalTest.h, which is in the Developer directory. These things are not meant to be included in a packaged game. I’m actually interested in how you are actually managing to package a build with this enum as it would require including FunctionalTest.h, which will cause the packaging attempt to fail for the same reasons listed above.

Ah I see what the problem was, there wasn’t much specification on how you were creating this struct so I assumed you were creating it in code, not directly in the editor. I’ve reproduced the crash and I’m checking other versions before placing a bug report in.

I’ve made a post in questions before in Packaging & Deployment, but resolved this on my own. Since I didn’t get any staff to acknowledge the error there, I thought I’d repost it here.
It works fine in editor mode, but once packaged the start up of the .exe immediately leads to an assertion failed enum error message.

The post in question:

The steps to reproduce the problem:

  1. Create third person (should work with blank, but only tested with third person) project.
  2. Create Struct with a member of “EComparison Method” enum
  3. Open ThirdPersonBP (or any actor blueprint on the map)
  4. Add variable of the struct
  5. Compile the actor BP, set some default value, doesn’t matter
  6. Package win 64 development build (tested only that one), start the .exe, watch the crash

Bump. Hope a staff member takes note soon.

Interesting. But there definitely is something wrong. I would understand if it never worked at all, but it DOES work in packaged builds. Just not if it’s in a struct.

If it works as a variable but not as a member of a struct then there is definitely some kind of bug involved. As for the usage of the enum: since this is a pretty basic mathematical enum I just searched for “EComparison” in my blueprints when adding a variable and changing its type. Packaging works fine too. You should be able to test this by following the steps I posted.

This is true, and here I was thinking my formulations were precise. I forgot to mention it was all blueprint only! Please keep me up to date if you have further information on this issue and thanks for your time.

Well better late than never; I’ve placed the bug report in for this which can be found and tracked here: UE-47340

Have a nice day!