# Child Actor Component Data Loss/Corruption

**URL:** <https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [December 20, 2016, 12:46am UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754 "2016-12-20T00:46:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![trentpolack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/trentpolack/32/1173069_2.png) [@trentpolack](https://forums.unrealengine.com/u/trentpolack)\
**Post date:** [December 20, 2016, 12:46am UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/1 "2016-12-20T00:46:17Z")

</div>

Hi! I have a sad!

I use Child Actor Components fairly frequently for my player avatar customization system, and ever since 4.14, there have been some serious instances of data loss in their use. Right now, it tends to be a result of a child actor component just losing data at the top-level (like an actor with a Child Actor Component as a child will lose bits and pieces of data from the intended-assigned child actor).

This is mega hard to explain with any clarity, but here’s a screen shot (I had to delete and re-assign the top attachment, the bottom attachment is how I found it). In this image, you’ll notice that mech\_attachment\_one\_null has all of its data in place (Part and StaticMeshActor). But, for whatever reason, mech\_attachment\_two\_null (which is the _exact_ same setup with a different name) has lost its static mesh actor at some point. The core blueprint itself still is fine, but the child actor component reference is all wonk.

I’m using a custom fork which is mostly 4.14.1 with some cherrypicked (and unrelated) master bits and custom bits.

 ![119325-ue4_child_actors.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/0/7f04214e1a0b4003b5f48471430eb3d60735559f.png)

---

<div class="post-metadata">

**Author:** ![Stephen\_Ellis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/stephen_ellis/32/1210665_2.png) [@Stephen\_Ellis](https://forums.unrealengine.com/u/Stephen_Ellis)\
**Post date:** [December 20, 2016, 1:53pm UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/2 "2016-12-20T13:53:04Z")

</div>

I have moved this into the Bug Reports section for further investigation. We’ll follow up soon.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [December 22, 2016, 1:50pm UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/3 "2016-12-22T13:50:49Z")

</div>

Hello mittense,

Where are you setting the Static Mesh Component values for these actors? Is it in their defaults, in their constructors, or otherwise? Does this occur with any class that has a static mesh component in it that is set as a child actor, or does it only happen with this particular class? Are you able to reproduce this in a fresh project?

---

<div class="post-metadata">

**Author:** ![trentpolack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/trentpolack/32/1173069_2.png) [@trentpolack](https://forums.unrealengine.com/u/trentpolack)\
**Post date:** [December 22, 2016, 3:54pm UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/4 "2016-12-22T15:54:57Z")

</div>

So, basically, my setup is this (I can’t easily setup a small project with this, but I have had be reproducible):

- Base C++ implementation of an actor type that are added as UChildActorComponent members in a base class.

- This base class has a list of UChildActorComponent members that are all filled with the aforementioned actor type. I set them up in the constructor like this:

(and so on)

- Then, in-editor, I create a base blueprint class for the primary actor type (that holds all the child actor components).
- I create a whole bunch of “dummy” instances of the UChildActorComponent actor class which all have their static mesh instances set to a simple cube.
- Then, after that, I have a blueprint that is derived from those “dummy” instances that further fleshes out specific functionality with actual static meshes and game data.
- Similarly, I have a blueprint class derived from that primary actor type which has references to the actual actor data intended to fill out the UChildActorComponent fields.

I hope that kind of explains it?

---

<div class="post-metadata">

**Author:** ![trentpolack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/trentpolack/32/1173069_2.png) [@trentpolack](https://forums.unrealengine.com/u/trentpolack)\
**Post date:** [December 22, 2016, 3:55pm UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/5 "2016-12-22T15:55:55Z")

</div>

And, and one quick addendum: this is not the only setup related to child actor components that has been affected by this issue. This is just the one I’ve spent the most time with and tried to work around the most. I had some pretty significant data loss in any blueprint that relied on child actor components.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [December 22, 2016, 9:37pm UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/6 "2016-12-22T21:37:02Z")

</div>

Thank you for the information. I’ve placed a bug report in which you can find here: [UE-40027](https://issues.unrealengine.com/issue/UE-40027). It’s quite a confusing issue and may of been happening prior to 4.14 but the specifics of a child actor component weren’t visible in blueprints prior to 4.14. You should be able to track the bug’s progress there.

---

<div class="post-metadata">

**Author:** ![trentpolack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/trentpolack/32/1173069_2.png) [@trentpolack](https://forums.unrealengine.com/u/trentpolack)\
**Post date:** [December 22, 2016, 9:38pm UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/7 "2016-12-22T21:38:46Z")

</div>

Thanks a lot! \<3

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_367c2bff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_367c2bff](https://forums.unrealengine.com/u/anonymous_user_367c2bff)\
**Post date:** [December 23, 2016, 6:50pm UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/8 "2016-12-23T18:50:25Z")

</div>

can confirm, just stumbled upon this. It works fine if child actor is an empty c++ actor, as soon as you add meshComponent pointer to it - stuff breaks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_36c68e4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_36c68e4a](https://forums.unrealengine.com/u/anonymous_user_36c68e4a)\
**Post date:** [June 26, 2018, 2:31pm UTC](https://forums.unrealengine.com/t/child-actor-component-data-loss-corruption/379754/9 "2018-06-26T14:31:11Z")

</div>

The bug claims to be fixed, but I’m still experiencing exactly this in our project on 4.19

It was stable for most of the project, but now I can’t get it to remember all the template settings from one session to the next. Someone else has observed that it seems to be caused by casting:

> **[Child actor details pane gets lost if there's a cast node](https://forums.unrealengine.com/questions/719650/child-actor-details-pane-gets-lost-if-theres-a-cas.html)**
>
> If thre’s a function in main actor that uses child component’s actor the details panel gets lost. I know it sounds confusing but bare with me. Images should make it clearer. Here’s a quick explanation: I’ve added child actor component in my main...
