Crash: property belongs to some TRASHCLASS

After a pretty big refactor which seemed at first to have gone fine, upon next reload of the engine, the game crashes like 90% of the time (no idea what seemingly random factor is influencing the 10%) when an NPC_Guard is in the level.

NPC_Guard was originally a subclass of Character, but he was reparented to NPC_Base, which is a subclass of Character (because I want to share basic functionality between every type of NPC, not just Guard). NPC_Citizen, who is a basically-empty subclass of NPC_Base, also causes this crash. NPC_Base himself doesn’t cause a crash, and can walk around and do whatever just fine. I can make a new subclass of NPC_Base and that works too. This was all working fine initially, no errors or warnings in any of the blueprints, now on restart it’s a crash.

The pertinent part of the log reads thus:

[2015.10.07-04.35.01:258][616]LogWindows: === Critical error: ===
Assertion failed: ((UObject
)GetOuter()) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.9\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 308]
‘NPC_Guard_50’ is of class ‘NPC_Guard_C’ however property ‘BoolProperty_2697’ belongs to class ‘TRASHCLASS_NPC_Base_272’**

I don’t know what a TRASHCLASS is exactly but it seems like something that was supposed to have been cleaned up at some point and wasn’t. I found a few other possibly-related questions on here but nothing especially useful.

I dunno what to do here. I tried migrating Guard into a new project to see if that’d do the trick, it does not.

I could just recreate NPC_Citizen and NPC_Guard, and copy paste their many graphs over, but this is kind of a large project, I would have to fix up references all over the place. I’d sooner un-corrupt these classes somehow. Definitely seems like a problem with reparenting (maybe specifically with reparenting one Character subclass to another?)

Can provide SVN deets if someone wants a closer look.

Oh hey Joe. How’s it going?

I’m actually having this very same problem with what appears to be my GameState.

[2015.12.17-12.46.28:590][997]LogWindows:Error: === Critical error: ===
Assertion failed: ((UObject*)ContainerPtr)->IsA((UClass*)GetOuter()) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 308]
‘BP_GameState_C_0’ is of class ‘BP_GameState_C’ however property ‘ByteProperty_126’ belongs to class ‘TRASHCLASS_BP_GameState_72’

Did you manage to get your problem sorted?

Hey, I might have the answer to this. Not finished with my testing, but I think I may have solved the issue on my end. I was using a Blueprint Macro Library in my project; and one of the macros I was using in my GameState BP happened to reference that very same GameState. I can’t explain why that was causing an issue, but the crash stopped occurring after I removed that macro.

Might be a bit late for you, but I hope this helps for future reference,


Glad to hear you got yours figured out.

I didn’t get mine sorted out in any sensible way - mine was occurring in NPC_Guard. Long story short now there’s an NPC_NewGuard with exactly the same stuff pasted into it and NPC_Guard is deprecated. ¯_(ツ)_/¯

Oof. What a mess :frowning: