+1 vote

Hey all,
I'm not sure if this is a bug or I'm just doing something funky. I'm getting the error:

Parent node is busy setting up children, add_node() failed. Consider using call_deferred("add_child", child) instead.

Now I did figure out you're not supposed to use addchild inside _ready so I've refactored until all my _ready()s are clean and use calldeferred if adding nodes. However, I still get the error. I have a couple of more issues with it:

  • It does not point to any specific line in my code. This makes it very hard to debug.
  • It seems to run before my actual code is run. See below for a copy paste from my debugger. It shows right after -- Debugging process started --
  • It also keeps appearing after I close the game down.

Does anyone know what's going on and how to solve this? Many thanks!

--- Debugging process started ---
Parent node is busy setting up children, add_node() failed. Consider using call_deferred("add_child", child) instead.
Godot Engine v3.5.stable.official.991bb6ac7 - https://godotengine.org
OpenGL ES 2.0 Renderer: Apple M1
Godot version 3.5
in Engine by (17 points)

2 Answers

0 votes

Finally I found the cause of the error. Just posting it here in case it helps someone else. It was a sprite that was being loaded and set in the ready() function an obscure effect scene. So apparently load() in _ready() also causes the "Parent node is busy setting up children, addnode() failed. Consider using calldeferred("add_child", child) instead." error.

A couple of things I thought are not-helpful:
- The error message does not mention load(), just add_child.
- The error message does not point to the line or even script where the error is happening.
- The error message happens strangely before and after the debugging starts/ends.

by (17 points)
+1 vote

I had the same issue and in my case was a "RESET" Animation into my AnimatorPlayer:

enter image description here

I deleted it and now I don't see the warning.

Disclaimer: I am very new to Godot :)

by (50 points)

Thanks, this fixed it for me too, this was driving me crazy. It also caused knock-on effects on the rect_position of the node where when I switched between scenes in the Godot editor, it changed that node's position to incorrect values.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.