Critical error when trying to spawn actors

Hey there,
got a problem with the “Set Child Actor Class”-Node of Blueprints. When I use it bound to a key in my Player Controller, everything seems to work fine. But when I use it on my NPCs (to give them a certain actor), when I try to set the child actor class a second time (first time is fine), the editor shuts down and I got the following error in my logs:

[2017.04.18-18.46.57:369][573]LogWindows:Error: === Critical error: ===
[2017.04.18-18.46.57:369][573]LogWindows:Error: 
[2017.04.18-18.46.57:369][573]LogWindows:Error: Fatal error: [File:D:\Build\++UE4+Release-4.14+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2299] 
[2017.04.18-18.46.57:369][573]LogWindows:Error: Objects have the same fully qualified name but different paths.
[2017.04.18-18.46.57:369][573]LogWindows:Error: 	New Object: BP_Essen_C /Game/TopDownBP/Maps/UEDPIE_0_Untitled.Untitled:PersistentLevel.BP_Trinken_C_0
[2017.04.18-18.46.57:370][573]LogWindows:Error: 	Existing Object: BP_Trinken_C /Game/TopDownBP/Maps/UEDPIE_0_Untitled.Untitled:PersistentLevel.BP_Trinken_C_0

So its really just the “Set Child Actor Class”-Node used in a BTTask-Blueprint with a manually set class. If I use the same node under the same circumstances in my Player Controller to set the child actors of the same NPCs manually, I can swap as many times as I wish without any crash…

EDIT: Updated because not the “Spawn Actor”-Node is the problem, but the “Set Child Actor Class”-Node

At first glance, it appears the actors getting spawned might have the same name. Different actors, same name. How fast are you spawning the actors?

It can happen that multiple actors are spawned at the same time, called from different tasks. I tried to make an event in my player state which spawns the actors, the event could also be called multiple times per tick by the tasks. Same result.

Hello Holylon,

I was unable to reproduce the issue you are experiencing. I have a couple of questions that will help me narrow down the issue you are having.

  1. Are you able to reproduce this issue in a new project?
  2. If so could you provide a detailed list of steps so that I can reproduce your issue on our end?
  3. Could you provide the full crash log for your issue?

Thanks!!

Full error log is here: Error Log

When I have the time I try if I can reproduce the issue and call back then.

Looking through the log you provided, I’m seeing fatal errors in your MyPlayerState. The Error that is there is:

Error The current value of the ’ SpawnTransform ’ pin is invalid: ‘Spawn Transform’ must have an input wired into it (“by ref” params expect a valid input to operate on).

Resolve this issue, delete your saved and intermediate folders and package again. If the build fails could you send that new log.

Thanks!

Thanks for looking through my log. The error you found was from a previous build, the error did not occur when the Editor crashed. I provide another error log without that error here

I am one step further. I think the error does not occur on a “Spawn Actor”-Node, but on a “Set Child Actor Class”-Node. It occurs when I set the class in one NPC , and then try to set it to a new class.

EDIT: Updated the initial post to match my discoveries

I got the solution. I destroyed the child actor after I set it. When I try to set it again, the editor crashes as I said. It’s a bit stupid from my side, but maybe the editor could also handle this better. Nevertheless, do not set the class of an actor that you destroyed beforehand :smiley: