Child Actor Component keeps corrupting it's parent actor .uasset

I’ve got a nasty crash that’s popped up three days in a row now. From the Crash Context file:

Fatal error: [File:D:\Build\++UE4+Release-4.14+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 11] &nl;Cast of LinkerPlaceholderExportObject /Game/Characters/CharacterBase.CharacterBase_C:NODE_AddChildActorComponent-0.NODE_AddChildActorComponent-0_CharacterSystem_C_CAT to Actor failed&nl;

The project will be running fine (opening, closing, compiling, PIE with no problems), but once this crash happens the project will REFUSE to launch, returning this error as soon as the launch hits 100%.

Deleting the CharacterBase.uasset allows me to open the project again, but renders it basically useless, since CharacterBase is my top-level character class and it’s referenced by everything. Copy/pasting a “clean” CharacterBase from a previous version does not fix the problem and brings the load crash back. I’m totally at a loss. It seems to happen around the time I start using data tables and arrays of structs inside the child component, but since I don’t know the project file is ruined until I close/reopen it’s very hard to pinpoint.

Does anyone know what might be causing this?

Hey DaxJericho-

It appears that the crash is related to an AddChildActorComponent node being used. Can you provide a screenshot of how your CharacterBase and ChildComponent are setup as well as anywhere the AddChildActorComponent node is used in your CHaracterBase blueprint? Additionally, if you believe the issue arises when using data table / structs, can you try setting each up in a step-by-step fashion where you save and close the project each time. This should help pinpoint what change causes the issue to occur. To help provide more information, could you also provide the full callstack from the crash report window as well as the log files from the crash?

I can’t call it an answer (and so I won’t post it as one) but I was having terrible, corrupted-style crashes this morning in 4.14 with child actors too. I had two instances of a child actor on a parent blueprint, and had one variable (an enum state) that I was changing in the dropdown properties. It would work fine until I shut down and reopened the editor - at which point it would immediately crash as soon as either the child actor, or the parent actor, (or the level that contained instances of the parent actor) were loaded.

If I went into the asset folder and moved the child actor asset out of the folder, I was then able to open the project and level - the parent object having lost its reference to the class of the child actor. Obviously, this mucked up a fair bit of my blueprint references.

What I did, was change the child actor to instead be an actor that was spawned on beginplay, with the enum variable changed as soon as it was spawned and attached.

The rest of the blueprints (once tidied up and converted to use the spawned version instead of the child-actor version) works fine, even after reopening the editor.

Hope all that is of useful reference to anyone else who may come across this issue! (It’s not an answer, but it may be useful data.)

Thank you Bioluminescence for the workaround workflow. I’m glad to hear you were able to get your project running again. If you’re able to reproduce this issue, can you provide the setup that causes the crash? When setting up the parent/child blueprints, what is the base class for each? What components/variables are in the parent blueprint other than the child actor component? What components/variables makeup the child blueprint? Let me know if you can provide any information that might help me reproduce the issue on my end.

Bioluminescence’s workaround worked for me! It’s frustrating to not be able to use the constructor, but I don’t really have the time to try to narrow down the exact cause of the initial crash. Similar to Bio’s situation, the problem seems to be related to some kind of interaction between AddChildActor and Enums (or possibly structs). In my particular case, implementing structs and enums in the Child Actor’s graph is what seems to cause the problem.

This screenshot shows the BP where the child actor is being set. These are the only nodes in my CharacterBase entire graph.

I’ve also been seeing this crash since this morning, I’m not using the AddChildActor node but I am using several Child Actor Components and the new child actor template functionality introduced in 4.14. Same error caused by Casts.cpp. Moving the problematic blueprints out of the folder, opening the project, then moving them in seems to be a workaround for now, but the crash just happened again when I tried to open the project and I can’t seem to figure out why. Any help would be appreciated!

Please provide the callstack and log files from the crash for extra information. Additionally, it would also help if you can provide steps to help me reproduce the crash on my end or provide a sample project that has the crash occurring. How are you adding/using the structs/enums in the child component? Does the crash occur if you call the AddChildActorComponent node on BeginPlay rather than in the construction script? I am unable to investigate this crash further without information on how the character/child component is setup.

For me this crash occurs without any calls to the AddChildActorComponent node at all. I just have an Actor Blueprint set up with a lot of Child Actor Components in it that are other Actor Blueprints. The problem seems to happen when I try to get Child Actor from the Child Actor Component and cast it to its class, and then call a function in that blueprint class. I thought it was related to issue UE-38690 but I just built from source with that fix, recreated the blueprints that were having the issues, and I’m still getting the crash. The weird thing is that it’ll work fine for a bit, and at some point the Blueprint will get corrupted and I won’t be able to open the project again. The only way to get around it is to move the Blueprint out of the project folder, open up the project, and move it back in again, as one commenter mentioned. Let me know if I should open up a new bug report for this, but I figured the error was pretty similar. Here’s what I get:

[2016.12.04-22.22.52:633][  0]LogWindows:Error: Fatal error: [File:C:\Users\Emre\Perforce\UnrealEngine-4.14\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 11] 
[2016.12.04-22.22.52:633][  0]LogWindows:Error: Cast of LinkerPlaceholderExportObject /Game/Blueprints/UI/PD_HandMenu_BP.PD_HandMenu_BP_C:DrumsTab_GEN_VARIABLE.DrumsTab_GEN_VARIABLE_PD_BasicButton_BP_C_CAT to Actor failed

Can you provide the full callstack and log files from the crash for additional information? Also, if you’re able to reproduce the crash you’re getting, can you provide the setup steps to help me recreate the issue you’re seeing on my end? This includes the blueprint settings/graph node setup for the main blueprint as well as any other blueprints added as child components.

Sure thing, I can provide a full callstack when I get back home tonight. FYI, I thought this issue was similar so I commented on there as well, and I was told the issue UE-39323 was opened for the problem in that question. The callstack for that issue looks almost exactly the same as what I was seeing, except in that case they’re trying to get the Parent of the Child Actor Component. Just wanted to let you know in case you weren’t aware of that issue being opened and fixed!

I will still look at the callstack information from your crash, but it is good to know that this was found elsewhere and fixed. Hopefully your callstack will tell us that they are the same issue.

I’ve had my project crash on load two days in a row now as well.

Cast of LinkerPlaceholderExportObject /Game/Blueprints/Pawn/StealthCharacter.StealthCharacter_C:Weapon_GEN_VARIABLE.Weapon_GEN_VARIABLE_WeaponBase_C_CAT to Actor failed

The work around of moving the WeaponBase blueprint (which is my child actor) out of the project folder got me into my project, and then I was able to move it back and access it.

Here is my begin play set up on my Pawn, which might be useful for reproducing:

I think I had my weapon attached as a child actor for one or two backups before having problems, and it definately appeared after I added a grapple-hook function, which references the PawnReference I set from my pawn to set the players location for the duration of the grapple.

I’m having this same issue! I’ve already removed the parent class once, in order to open the project, and verified that everything looked clean, but it’s happened again this morning.

My parent blueprint had 4 child actors, all of the same class, which varied only by color and size. One of these child actor components was the offender, so after removing it from the parent class, the project is working again. There was nothing unique about that one child actor component, so I’m stumped as to why it was causing an issue when the others weren’t.

Similar to others, the project was working perfectly and saved normally, but upon reopening is when everything crashed.

For now, until we understand why this happened, I’m not going to risk it again, so I’ve deleted all the child actors from this parent BP and placed them into world, as Bioluminescence did. It’s not a permanent fix, but few things scare me so deeply as not being able to open my project in the morning.

Having the same issue…
Have a bunch of child actors inside of a parent blueprint (are components, they are not created at run-time or added in construction). Inside the child actor i’m trying to cast to the parent blueprint (get parent actor node) and get a bool variable from the parent. Compiles with no errors, but upon restart i get the same crash issues, with the same solution of moving the bp out of the content folder and, moving it back once editor is open. Everything plays fine in the editor, though i cant build

Get the error:

Fatal error: [File:D:\unreal\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 11]

Error: Cast of LinkerPlaceholderExportObject /Game/Developer/****/Maze/BaseMaze_Bp.BaseMaze_Bp_C:Trigger_G_01_GEN_VARIABLE.Trigger_G_01_GEN_VARIABLE_TriggerButton_Bp_C_CAT to Actor failed

That was my solution as well. I ended up removing all child actors from my project and putting their functionality directly into the necessary parent classes. It’s an annoying workaround which means I’m duplicating a lot of code, but until we figure this bug out I’m not going anywhere near child actors.

Seems that i have a similar problem. Cant use my inventory actor as component anymore because the editor crashes after restarting and trying to open any related blueprint. That is bad because the inventory actor is part of every lootable entity in the world.

In UE 4.14, we’ve been getting the similar problem for the past week. It crashes when opening the asset in the editor. In code, it crashes in:

ChildActorComponent::Serialize()

It CastChecks the ChildActorTemplate to an Actor (line 93), which fails. The ChildActorTemplate is not null.

If I change the CastCheck to a simple Cast (if it succeeds) it seems to fix the problem at least on our build. I don’t know enough about the serialization or the actortemplates to know if that’s going to cause problems elsewhere, though.

I spoke too soon. Turns out skipping this cast breaks things when the content is cooked for windows :frowning:

Having the same issue.

Fatal error: [File:D:\Build\++UE4+Release-4.14+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 11] 
    
    LogWindows:Error: Cast of LinkerPlaceholderExportObject /Game/1inventorySystem/Blueprints/BP_Crate.BP_Crate_C:Storage_GEN_VARIABLE.Storage_GEN_VARIABLE_BP_Storage_C_CAT to Actor failed
    UATHelper: Packaging (Windows (32-bit)):