Parent/Child spawning bug

I have a bug which is easy to workaround but it could be the cause for my game crashing after being packaged.


Repro steps:


  1. Create a new blueprint Actor “Parent”
  2. Create a new blueprint Actor “Child” which is a child of “Parent”
  3. Create a new blueprint Actor “Child_Child” which is a child of “Child”
  4. Create a new function “MyFunction” in “Child”
  5. Add a “Spawn Actor from Class” node in the function, select “Child_Child” as the class and set the transform to all 0
  6. Create a local variable “NewChild” of the type “Child”
  7. Connect the Actor output pin and execution pin from the “Spawn Actor” node to a “Set NewChild” variable setter node
  8. Hit Compile

Should look like this:

http://puu.sh/iBMRP/f749049968.png

You will see there is an error and a warning and the engine thinks that a “Child” reference could not hold a “Child_Child” variable.

As a workaround you can just use a “Parent” variable, then there are no errors or warnings after compile, but if you then compile the “Parent” blueprint the error and warning will pop up in the “Child” blueprint, until you hit compile in the “Child” blueprint again, then the error and warning is gone until you hit compile in the “Parent” blueprint, and so on.

With the workaround it works in PIE and standalone, but after packaging my game crashes after I try to spawn one of the Child_Childs, while one other Child_Child works and does not crash the game, so I’m not 100% sure whether it’s related to this. It’s definitely an annoying bug.

could anyone look into this?

Hey ,

Thank you very much for pointing out this issue with child blueprints and spawn actors. I have successfully reproduced this issue and forwarded the bug to our developers. If you’d like to reference this bug in the future, please refer to: UE-17866

If you have any further questions, please let us know. Have a great day!

Thanks! :slight_smile:

Hi, this bug is still in 4.9.1. Could you give any ETA on when this will be fixed? Also, if I change something in the “parent” and compile it, then I get a compile error in the “child” until I manually open the child and compile it, then there is no error.

Hey

UE-17866 is set as a minor bug and it’s still unresolved. Please feel free to check up on this bug at any time.

Thanks!

Hi , any new on this? Also, were you able to reproduce the compile issues I mentioned in the comment above? Thanks!

Hey

UE-17866 is set as a priority 4 - minor bug within . It’s currently on our to do list but it’s not resolved at this time.

Thanks!

Hi , any update on this?

UE-17866 is still on our to do list with a priority 4 set on it. It’s not resolved yet.

Is this the place to provide community feedback and say that I too would like to see this issue fixed?

I was banging my head against a wall for quite a while until I stumbled across this thread, and I’m pretty sure it is why my grandchildren classes are failing in mysterious ways.

Edit: turned out to be more directly related to the issue on https://answers.unrealengine.com/questions/71488/derived-blueprint-compiling-errors-and-inconsisten.html