Packaging Error: archetype is not the CDO nor a default subobject of my class

Hi, after spending months on a private project I got these errors while loading, starting to play and packaging my project:

While Packaging:

PackagingResults: Error: SerializedComponent archetype is not the CDO nor a default subobject of my class.
Me = MyCaveControllerActor_C
/Game/Untitled.Untitled:PersistentLevel.MyCaveControllerActor_2,
Component = SceneComponent 
/Game/Untitled.Untitled:PersistentLevel.MyCaveControllerActor_2.DefaultSceneRoot,
Archetype = SceneComponent 
/Game/MyCaveControllerActor.MyCaveControllerActor_C:DefaultSceneRoot_GEN_VARIABLE

While playing:

LogCheckComponents: Error: SerializedComponent archetype is not the CDO nor a default subobject of my class. Me = MyCaveControllerActor_C
/Game/UEDPIE_0_Untitled.Untitled:PersistentLevel.MyCaveControllerActor_2, 
Component = SceneComponent 
/Game/UEDPIE_0_Untitled.Untitled:PersistentLevel.MyCaveControllerActor_2.DefaultSceneRoot,
Archetype = SceneComponent 
/Game/MyCaveControllerActor.MyCaveControllerActor_C:DefaultSceneRoot_GEN_VARIABLE

While I’m able to play and the mentioned class/blueprint seems to work right, I’m not able to package the game.

Oh! I get this message for every blueprint in my level.

Currently there is only the MyCaveControllerActor one, but if I drag another blueprint in, the error is thrown for this one as well; e.g.

LogCheckComponents: Error: SerializedComponent archetype is not the CDO nor a default subobject of my class.
Me = PROTO_BP_Blueprint_0_C
/Game/Untitled.Untitled:PersistentLevel.PROTO_BP_Blueprint_2,
Component = SceneComponent 
/Game/Untitled.Untitled:PersistentLevel.PROTO_BP_Blueprint_2.DefaultSceneRoot,
Archetype = SceneComponent
/Engine/Transient.PROTO_BP_B
lueprint_0_C:DefaultSceneRoot_GEN_VARIABLE

Solution/Cause:

I narrowed the problem down by going back several commits. At one point I added the following lines to the DefaultEngine.ini file, cause I was annoyed by too much output:

DefaultEngine.ini 
[Core.Log]
Global=Warning

If I comment out the Global=Warning line, all works again; if I leave it in: same errors… strange.

Could this be explained?

The explanation is in UObject::CanCheckDefaultSubobject, specifically this line:

bCanCheck = bCanCheck && (bForceCheck || UE_LOG_ACTIVE(LogCheckSubobjects, Error))

If the LogCheckSubobjects category is set to Error (or lower), then UObject checks like the one you saw will be run. By default, LogCheckSubobjects level is set to Fatal, so the check doesn’t run, but when you override the default log settings with Global=Warning (also Global=Error would do the same thing) then it has the side effect of causing UObject checks to run.

I was very surprised to see functionality changed by a change in the log level. You simply wouldn’t know this without finding it in the code.

Thanks for digging so deep here :slight_smile:
This is indeed really interesting and seams almost like an unwanted behaviour.

You bet. Your investigation made this a lot easier to solve. I didn’t initial put together that setting the global log level was what caused these errors to start showing up until I read your answer.

By the way, I reported the “problem” to Epic. I created a test case of it here:

The log errors occur when you create a blueprint actor, add a component to it, drag it into a level, and have global=warning or LogCheckSubobjects=warning.

1 Like