Reference being added to defaults container

I’m as certain as I can reasonably be, I put in some checks for CDO flags to stop the CDO from doing anything but that did not help (it also never returned true for the CDO flags, so it doesn’t seem like the CDO is getting a call at all). I tried making an example project but the issue was not present (I have quadruple checked that everything that could affect it was the same).

What’s more, my component has now become null. This is not the first time it happens, suddenly for no discernible reason a UActorComponent will become null (getting it from BP returns null, and selecting it in the hierarchy just shows a completely blank defaults tab) even though nothing in the logic for adding it was changed (doubly sure of this since I use Perforce and the actor that has the component spawned and attached has not been checked out). Before I thought this issue was a bug with the C++ delegates (last time it happened was when I added multicast delegates to the component) but it now happened out of the blue. If I were to hazard a guess I would say that the construction of the UActorComponent fails and causes:

//creature .cpp
CreatureActionHandlerComponent = CreateDefaultSubobject<UCreatureActionHandler>(FName("ActionHandler"));

to assign a null to CreatureActionHandlerComponent, but I can’t say for sure.

I don’t really know what the issue is right now so I will do some testing and report back once I start getting a clearer picture, it might be that this defaults bug is just a symptom of a root cause (which also causes this bug with the component going null). The problem is that it is so sporadic I can’t really pinpoint the change that causes this to happen, all I did between the time the component was fine and when it started returning null was refresh code files and rebuild in VS.