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

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]

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

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

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

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?

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

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.

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).

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

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

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