Error when opening in editor: Parent node is busy setting up children, `add_child()` failed

Godot Version

4.3.stable.steam

Question

When I load my current project in the editor, it immediately puts out the following errors:

Parent node is busy setting up children, add_child() failed. Consider using add_child.call_deferred(child) instead.
scene/main/window.cpp:1771 - Condition “!is_inside_tree()” is true.

This happens before I even run anything. In fact, if I run the project, the messages are gone and seem to appear under no other circumstances, and I can’t discover any broken functionality. (All my cases of add_child in the project are deferred already, too.)

I’ve found some similar looking bug reports related to Save on Focus Lock (like "Parent node is busy setting up children" error on focusing out with "Save on Focus Lost" enabled · Issue #76459 · godotengine/godot · GitHub) in the editor settings, but that’s always been off for me (and it doesn’t happen on focus lock either)

Any idea what could be causing this?

Could it be a plugin issue? Or perhaps you have a ‘tool’ that tries to run a script that adds nodes on loadup? (Sorry, I am only guessing here, but something must be trying to run without you having run any scenes. I can only think of plugins and maybe ‘tool’ scripts).

Does this also happen on a fresh new project?

It’s only with this one specific project. I also don’t really have any plugins or modifications that are not out-of-the-box with the Godot Steam build.

I’ve tried setting most project settings back to the default values and stripping the project of most anything so it’s basically empty again, but so far no luck.

Can I ask you to go into your project folder root and delete the .godot folder? This is essentially your editor’s cache for the project.
Also can you create a completely empty new scene and set it as your Main Scene? What happens if you reload your project?

1 Like

Oh, it looks like deleting the cache did the trick. Thanks a lot!

1 Like