# %s has a reference to default subobject (%s) of %s

**URL:** <https://forums.unrealengine.com/t/s-has-a-reference-to-default-subobject-s-of-s/463531>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, question\
**Created:** [April 9, 2020, 5:49am UTC](https://forums.unrealengine.com/t/s-has-a-reference-to-default-subobject-s-of-s/463531 "2020-04-09T05:49:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![imi0000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@imi0000](https://forums.unrealengine.com/u/imi0000)\
**Post date:** [April 9, 2020, 5:49am UTC](https://forums.unrealengine.com/t/s-has-a-reference-to-default-subobject-s-of-s/463531/1 "2020-04-09T05:49:35Z")

</div>

I am relatively new to Unreal Engine and working in a quite big project. The other day when hunting a bug in a different castle, I turned on all the logging and found a about 30 log errors from module LogCheckSubobjects (together with a breakpoint hit inside UObject::CheckDefaultSubobjectsInternal() on a CompCheck(OtherReferencedSubobjects.Num() == 0), stating something in the form

```
Error: ObjectProperty /Script/Engine.ExpressionInput:Expression has a reference to default subobject (Class /Script/Engine.MaterialExpression) of Package /Script/Engine.

```

The comment above the checks read like this:

```
	// Check for references to default subobjects of other objects.
	// There should never be a pointer to a subobject from outside of the outer (chain) it belongs to.

```

So I guess there is some issue with holding pointers to subobjects… but what is the issue? Why should there never be such a pointer? How else would you reference subobjects?

As expected, a search in [docs.unrealengine.com](http://docs.unrealengine.com) for LogCheckSubobjects yields 0 results. (Actually UE-30888 but that seems to be a different issue).

Now, I already found [this blog post](https://blog.squareys.de/2018-11-20-ue4-reference-to-default-subobject-of/) where the author Jonathan Hale talks about this issue, and that he “solved” it by declaring some UPROPERTY to be writable, but I can’t make up from the blog what the problem is actually about here. After reading the post, I am even more confused, because declaring the reference _writable_ (although he did not have the intention to write on it) would make it even less sense (for a default object), right?

Also, his solution doesn’t really apply here, as I am not doing any blueprint scripting and the property in question is not even in my source, but in the engine code (we compile the engine from source). I assume its

```
UPROPERTY(transient)
class UMaterialExpressionFunctionInput* ExpressionInput;

```

from struct FFunctionExpressionInput?

Anyway, can someone explain me, what LogCheckSubobjects does, why its an error to have a reference to a default subobject and how the appropriate solution is?

---

<div class="post-metadata">

**Author:** ![dog\_funtom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dog\_funtom](https://forums.unrealengine.com/u/dog_funtom)\
**Post date:** [June 7, 2022, 9:04am UTC](https://forums.unrealengine.com/t/s-has-a-reference-to-default-subobject-s-of-s/463531/2 "2022-06-07T09:04:22Z")

</div>

For my case of this error helpful answer was in this thread: [Packaging Error: archetype is not the CDO nor a default subobject of my class](https://forums.unrealengine.com/t/packaging-error-archetype-is-not-the-cdo-nor-a-default-subobject-of-my-class/467506)

---

<div class="post-metadata">

**Author:** ![lab-one](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lab-one/32/780274_2.png) [@lab-one](https://forums.unrealengine.com/u/lab-one)\
**Post date:** [December 22, 2023, 3:51pm UTC](https://forums.unrealengine.com/t/s-has-a-reference-to-default-subobject-s-of-s/463531/3 "2023-12-22T15:51:24Z")

</div>

Thanks a lot, you saved so much time for me.  
This is quite unexpected that level loading process starts crashing when user enables or disables global logging.
