# \[BUG\] Changing Child Actor in Construction Script causes Build Failure

**URL:** <https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, packaging-projects, build-failed, question\
**Created:** [April 8, 2016, 4:35am UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393 "2016-04-08T04:35:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vincere](https://forums.unrealengine.com/u/Vincere)\
**Post date:** [April 8, 2016, 4:35am UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/1 "2016-04-08T04:35:53Z")

</div>

Reproduction Steps:

1. Create New Project

2. Create a Blueprint (BP)

3. In Construction script of BP, add a Child Actor and set the Child Actor’s class

4. See Pic as Example [1]: 

5. Save and Exit Project (This seems to be a surprisingly important step)

6. Re-open Project

7. Build

8. Build Failed due to an error that looks something like:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.04.08-04.30.10:744][0]LogOutputDevice:Error:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: begin: stack for UAT

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.04.08-04.30.10:744][0]LogWindows:Error:  
=== Critical error: ===

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: Assertion failed: !Object-\>IsUnreachable()  
[File:D:\BuildFarm\buildmachine\_++UE4+Release-4.11\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectHash.cpp] [Line: 423]

 ![85879-bugtesting.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/e/46e3119679a32b6f3e8ba0a27e0216b484edc7cc.png)

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: ChildActorComponent /Game/Chair\_Blueprint.Chair\_Blueprint\_C:Child Actor Component\_0

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.04.08-04.30.10:745][0]LogOutputDevice:Error:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: end: stack for UAT

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.04.08-04.30.10:747][0]LogPhysics:Warning: PHYSX: …\PhysX\src\NpScene.cpp (2946) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2016.04.08-04.30.10:747][0]LogPhysics:Warning: PHYSX: …\PhysX\src\NpScene.cpp (2946) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.

MainFrameActions: Packaging (Windows (32-bit)): CommandUtils.Run: Run: Took 29.5343903s to run UE4Editor-Cmd.exe, ExitCode=3

---

<div class="post-metadata">

**Author:** ![Vincere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vincere](https://forums.unrealengine.com/u/Vincere)\
**Post date:** [April 8, 2016, 5:09am UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/2 "2016-04-08T05:09:23Z")

</div>

It may be related to UE-29007, which is fixed in 4.11.2, [Child actor function doesn't work after editor restart [Demo project] - Programming & Scripting - Unreal Engine Forums](https://answers.unrealengine.com/questions/397684/child-actor-function-doesnt-work-after-editor-rest.html)

---

<div class="post-metadata">

**Author:** ![BPANDREW](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bpandrew/32/1194681_2.png) [@BPANDREW](https://forums.unrealengine.com/u/BPANDREW)\
**Post date:** [April 8, 2016, 9:42am UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/3 "2016-04-08T09:42:31Z")

</div>

I compiled the latest source 8 hours ago with the fix from UE-29007, the visual glitches in the editor were fixed however I still got this cook/build exception

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [April 11, 2016, 1:55pm UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/4 "2016-04-11T13:55:55Z")

</div>

Hello,

I have followed your repro steps, but when I attempted to package my project, I did not get any errors, and the packaging completed successfully.

Have you been able to reproduce this in a clean project? Does it occur if you set the child actor class to something like Actor or Character?

---

<div class="post-metadata">

**Author:** ![Vincere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vincere](https://forums.unrealengine.com/u/Vincere)\
**Post date:** [April 11, 2016, 2:11pm UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/5 "2016-04-11T14:11:02Z")

</div>

Yes, I still got the bug to appear with changing the class to actor. This is a clean project I’m reproducing the steps in.

I forgot to add in my steps of adding the BP to a level.

When I opened the project and changed to actor, it compiled successfully, however once I moved the blueprint in my level, it gave me the error again.

Note, I am still on 4.11.1, BPANDREW is on the latest build and, I believe, is having the same error

---

<div class="post-metadata">

**Author:** ![Vincere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vincere](https://forums.unrealengine.com/u/Vincere)\
**Post date:** [April 11, 2016, 10:31pm UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/6 "2016-04-11T22:31:22Z")

</div>

I’m sorry,

I was including the Starter Content in my project. Deleting the Starter Content appears to get rid of the bug, but I have no idea why, I’m trying to investigate it more.

---

<div class="post-metadata">

**Author:** ![Vincere](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vincere](https://forums.unrealengine.com/u/Vincere)\
**Post date:** [April 12, 2016, 4:42am UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/7 "2016-04-12T04:42:28Z")

</div>

I feel like I’m taking crazy pills.

I’ve been spending the entire day trying to figure this out, and the best that I’ve come up with is that when I include the map from the starter content “StarterMap” with the above steps, and the BP as laid out above, I get the error.

However if I build without StarterMap as one of the build maps, it builds fine.

If I delete all the maps, and create a new one and build without specifying maps, the error appears.

If I open up the project after deleting saved/intermediate folders and the maps reinstall and I build, the error happens.

If I open up StarterMap and delete “BP\_Skysphere” the error goes away.

So, long story short, I think, that it’s tied to BP\_Skysphere (or actors that use it as a parent).

---

<div class="post-metadata">

**Author:** ![user37337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user37337](https://forums.unrealengine.com/u/user37337)\
**Post date:** [April 13, 2016, 7:53am UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/8 "2016-04-13T07:53:51Z")

</div>

I have the same problem when trying to cook our current game in 4.11. I tried the current 4.11 Version from GitHub including the UE-29007 Fix but this doesn’t help. Here you can see the stack from the self compiled version:

link text

In the debugger i see that the object has set the flags EInternalObjectFlags::Unreachable and EInternalObjectFlags::NoStrongReference

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [April 13, 2016, 1:48pm UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/9 "2016-04-13T13:48:29Z")

</div>

Hello,

After some investigation and conversations with our developers, I have found that this issue is related to a known issue (UE-29322). This issue is currently being investigated by our developers. I have updated the report with repro steps based on this Answerhub post, and I will provide updates on this issue as they become available. Thank you for your report.

Have a great day

---

<div class="post-metadata">

**Author:** ![user37337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user37337](https://forums.unrealengine.com/u/user37337)\
**Post date:** [May 2, 2016, 8:48am UTC](https://forums.unrealengine.com/t/bug-changing-child-actor-in-construction-script-causes-build-failure/353393/10 "2016-05-02T08:48:42Z")

</div>

Seems to be fixed in 4.11.2. Thank you very much!
