Closed Zylann closed 1 year ago
Likely same issue as #79379
Maybe related:
I don't think all of them have the same cause though. For example the first one happens in scripts specifically (while the current issue even happens in C++), does not involve closing the app and does not involve the editor.
Perhaps one of the above (maybe related) issues involves buffering print output somewhere it shouldnt, and it is getting stuck when it finally is forced to deal with it. I think this because my @tool script included some print statements in the _exit_tree, and every time I would delete one of those nodes in the editor, it would take longer and longer to delete the node each time (exponentially) until it eventually seemed like it was going to hang for ever. Furthermore, if I had ever deleted even a single one of these nodes, if I tried to "Reload Saved Scene" it would hang indefinitely.
All these functions worked properly when I ran the project (i.e. the code wasn't executing in tool mode).
Maybe it was fixed by this #80161. Can you test it again? I didn't catch the crash.
Fixed.
Godot version
Godot 4.1 e709ad4d6407e52dc62f00a471d13eb6c89f2c4c
System information
Windows 10 64 bits NVIDIA GeForce GTX 1060
Issue description
I have a
print_line
in the destructor of a custom class derived fromNode3D
. I use it in verbose mode to track when things happen. In previous versions, it worked fine. But in Godot 4.1, closing the editor crashes:Steps to reproduce
My own case is in C++, but it can be reproduced with GDScript.
Have a scene with a node having the following script on it:
Have that scene open, and close the editor.
Now unfortunately you might not notice anything depending on how your OS handles that (as with many crashes occurring on exit). I work with debug builds and that definitely makes the crash visible in the debugger. I also use the following command line to build Godot on Windows:
Minimal reproduction project
PrintInNodeDestructor.zip Open the project, open the scene, then close the editor.