I’ve been experiencing a problem when the GC does its thing. The game will crash and I’ll get an error that says
[2014.11.07-02.11.07:246]LogUObjectBase:Error: ‘this’ pointer is misaligned.
Fatal error: [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.5\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp] [Line: 273]
Invalid object in GC: 0xcccccccccccccccc, ReferencingObject: BP_MyGame_C /Game/Maps/UEDPIE_0_Example_Map.Example_Map:PersistentLevel.BP_MyGame_C_1, ReferencingProperty: ObjectProperty /Script/TurnBased.CastedAbilityStruct:SourceCharacter
I started experimenting with forcing garbage collection to try to determine where in my game’s execution things are going wrong. If I force garbage collection as the first order of business in the level blueprint, I still get the same problem.
The Object property that is referenced in the error message is an object variable within a struct that I created. As far as I can tell, all variable instances of that struct type are UPROPERTYs. I do have a few other struct types that have this struct as a variable within their definition.
I don’t know what could be causing this problem and I’m hoping to get some advice on what to try to figure this out.