Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot crashes when node not found, and attempting to connect to a non existant signal #97193

Open
JustinBraben opened this issue Sep 19, 2024 · 3 comments

Comments

@JustinBraben
Copy link

Tested versions

v4.3.stable.official.77dcf97d8

System information

Windows 10 - Godot 4.3 stable - Vulkan 1.3.280 - Forward+

Issue description

My 2D project is experiencing a continuous crash on open, believed to be due to a corrupted scene. The crash occurs immediately upon opening the project.

Steps to reproduce

  1. Created custom resource to store ProjectileData
  2. Created a custom Projectile which extended CharacterBody2D, which had @export var stats: Resource which was the ProjectileData above
  3. Created a PlayerBeam which extended Projectile
  4. Attempted to add a Timer node to the base Projectile, but encountered issues starting the Timer
  5. Removed the Timer node from Projectile and its connected signal functions
  6. Added the Timer node to PlayerBeam instead
  7. Attempted to create a new inherited scene from player_beam.tscn (PlayerBeam), which resulted in a crash

Stack trace found in console:

Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
Vulkan 1.3.280 - Forward+ - Using Device #0: NVIDIA - NVIDIA GeForce RTX 3080

<Resource#-9223370267546291730>
ERROR: Cannot get path of node as it is not in a scene tree.
   at: (scene/main/node.cpp:2257)
ERROR: Condition "!is_inside_tree()" is true. Returning: false
   at: can_process (scene/main/node.cpp:835)
ERROR: Nonexistent signal: editor_description_changed.
   at: (core/object/object.cpp:1441)
ERROR: In Object of type 'Object': Attempt to connect nonexistent signal 'editor_description_changed' to callable 'Scen.
   at: (core/object/object.cpp:1390)
ERROR: Node not found: "" (relative to "/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitL.
   at: (scene/main/node.cpp:1792)
ERROR: Cannot get path of node as it is not in a scene tree.
   at: (scene/main/node.cpp:2257)
ERROR: Condition "!is_inside_tree()" is true. Returning: false
   at: can_process (scene/main/node.cpp:835)
ERROR: Nonexistent signal: editor_description_changed.
   at: (core/object/object.cpp:1441)
ERROR: In Object of type 'Object': Attempt to connect nonexistent signal 'editor_description_changed' to callable 'Scen.
   at: (core/object/object.cpp:1390)
ERROR: Cannot get path of node as it is not in a scene tree.
   at: (scene/main/node.cpp:2257)
ERROR: Condition "!is_inside_tree()" is true. Returning: false
   at: can_process (scene/main/node.cpp:835)
ERROR: Nonexistent signal: editor_description_changed.
   at: (core/object/object.cpp:1441)
ERROR: In Object of type 'Object': Attempt to connect nonexistent signal 'editor_description_changed' to callable 'Scen.
   at: (core/object/object.cpp:1390)
ERROR: Node not found: "" (relative to "/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitL.
   at: (scene/main/node.cpp:1792)

================================================================
CrashHandlerException: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] error(-1): no debug info in PE/COFF executable
[2] error(-1): no debug info in PE/COFF executable
[3] error(-1): no debug info in PE/COFF executable
[4] error(-1): no debug info in PE/COFF executable
[5] error(-1): no debug info in PE/COFF executable
[6] error(-1): no debug info in PE/COFF executable
[7] error(-1): no debug info in PE/COFF executable
[8] error(-1): no debug info in PE/COFF executable
[9] error(-1): no debug info in PE/COFF executable
[10] error(-1): no debug info in PE/COFF executable
[11] error(-1): no debug info in PE/COFF executable
[12] error(-1): no debug info in PE/COFF executable
[13] error(-1): no debug info in PE/COFF executable
[14] error(-1): no debug info in PE/COFF executable
[15] error(-1): no debug info in PE/COFF executable
[16] error(-1): no debug info in PE/COFF executable
-- END OF BACKTRACE --
================================================================

Minimal reproduction project (MRP)

  1. Open the project.
  2. Project should open normally
  3. If you double click player_beam.tscn in the godot editor FileSystem, the project will promptly crash
  4. Subsequent attempts to open the project will immediately crash

mrp_nonexistent_signal_after_create_inherited.zip

@JustinBraben
Copy link
Author

As a workaround, I can delete the contents of my .godot folder to reopen the project successfully. But trying to open the player_beam.tscn will bring back the crashes.

@Rindbee
Copy link
Contributor

Rindbee commented Sep 21, 2024

I can reproduce it. This is caused by deleting the scene root in the tool script. It is an edge case. Some update methods do not take this into account.

When setting the scene root, we may also need to consider connecting and disconnecting the node's tree_exited signal.

@JustinBraben
Copy link
Author

Ok! I figured I was probably doing something odd. Thank you for looking at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants