# Enum EComparisonMethod in struct leads to assertion failed

**URL:** <https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496>\
**Category:** Platform & Builds\
**Tags:** reproducible-bug, unreal-engine, crash, bug-report, packaging-projects, question\
**Created:** [June 30, 2017, 1:33pm UTC](https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496 "2017-06-30T13:33:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Herr\_Edgy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/herr_edgy/32/924115_2.png) [@Herr\_Edgy](https://forums.unrealengine.com/u/Herr_Edgy)\
**Post date:** [June 30, 2017, 1:33pm UTC](https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496/1 "2017-06-30T13:33:37Z")

</div>

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:

> **[After successful packaging - Assertion failed Enum](https://forums.unrealengine.com/questions/670004/after-successful-packaging-assertion-failed-enum.html)**
>
> I have packaged my project for Windows 64 bit version successfully, however, when I run the .exe a window pops up. The game does work in editor and since this is my first experience packaging a game, I have no clue why this is happening. Packaging...

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

---

<div class="post-metadata">

**Author:** ![Herr\_Edgy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/herr_edgy/32/924115_2.png) [@Herr\_Edgy](https://forums.unrealengine.com/u/Herr_Edgy)\
**Post date:** [July 6, 2017, 10:20am UTC](https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496/2 "2017-07-06T10:20:27Z")

</div>

Bump. Hope a staff member takes note soon.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [July 6, 2017, 7:11pm UTC](https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496/3 "2017-07-06T19:11:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Herr\_Edgy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/herr_edgy/32/924115_2.png) [@Herr\_Edgy](https://forums.unrealengine.com/u/Herr_Edgy)\
**Post date:** [July 7, 2017, 9:37am UTC](https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496/4 "2017-07-07T09:37:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [July 7, 2017, 5:55pm UTC](https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496/5 "2017-07-07T17:55:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Herr\_Edgy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/herr_edgy/32/924115_2.png) [@Herr\_Edgy](https://forums.unrealengine.com/u/Herr_Edgy)\
**Post date:** [July 7, 2017, 6:00pm UTC](https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496/6 "2017-07-07T18:00:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [July 17, 2017, 8:51pm UTC](https://forums.unrealengine.com/t/enum-ecomparisonmethod-in-struct-leads-to-assertion-failed/399496/7 "2017-07-17T20:51:44Z")

</div>

Well better late than never; I’ve placed the bug report in for this which can be found and tracked here: [UE-47340](https://issues.unrealengine.com/issue/UE-47340)

Have a nice day!
