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