-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Crash on exit in the GDScript module when debugging Godot #69183
Labels
Milestone
Comments
This is also visible with normal Godot build with address sanitizer(more info should be visible when using thread sanitizer )
|
@adamscott looks related to #67714 since the stacktrace is going through the |
My PR #69865 should be able to fix this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot version
Godot 4 11e1c83
System information
Windows 10 64 bits NVIDIA GeForce GTX 1060
Issue description
Something happened in GDScript during the last weeks or so, such that now everytime I open and close my project, Godot crashes when unregistering the GDScript module. That wasn't happening before. This crash is visible when debugging Godot on Windows, using the debug runtime (which Godot is still not doing in debug builds). At the very least, it is inconvenient because it crashes on exit everytime, which disrupts debugging sessions. It appears to not reproduce without running Godot that way, but that might just be luck.
Here is the error:
And the call stack, always the same:
Steps to reproduce
Unfortunately this is a race condition, and I have no expertise in the GDScript module, so reproduction steps are far from clear. But I can give some details.
About the project:
About the Godot build:
scons p=windows target=editor dev_build=yes warnings=all werror=yes -j4
detect.py
for Windows, as described in _DEBUG is not defined when compiling Godot in debug mode on Windows #31608thirdparty/oidn/core/device.cpp
in such a way that thethread_local
inside is not created in global space. Just put it inside a static function that returns a reference to it.Minimal reproduction project
I was unable to reproduce this in a simpler project. It's likely a race condition, so it's quite random to stumble on the right combination that makes the crash occur. It may also depends on having opened scripts in a previous session, so opening it for the first time might not work. Despite my efforts to describe the context, it's possible that it doesn't reproduce for you. However if you run Godot the same way I did, you might stumble on a project that does.
project.zip
I can confirm it still crashes when no debugger is attached. I was profiling Godot using Tracy: when I closed Godot, it LOOKS like it closes normally, but Tracy picked up the crash.
The text was updated successfully, but these errors were encountered: