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)ContainerPtr)->IsA((UClass)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.