-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Windows: Fix crash on application exit due to not unregistered callbacks #37549
Conversation
the problem here is that by the point the code reaches the destructor, there should not be any window left. If there is one, it's a bug. |
Why is there a window with the id of -1 in it? Is that correct because of base nil or because my vs is troubling or shouldn't it be there? |
Found it. The _nil window is with callbacks registered. Where and why? |
Is it wanted, that the |
453752a
to
c37b228
Compare
Okay I think the error is actually caused by the main window itself. When you close the window and unfocus it quick enough (reproducable, but you may need a few attemps), then the unfocus event is still sent to Godot while it is shutting down. This last event is sent to the callback function of the then freed window. I tested with my new fix and I couldn't manage to crash Godot again. |
b2214c5
to
6bfd1e9
Compare
#37382 (comment) |
6bfd1e9
to
3c1d4af
Compare
Was fixed along the way |
fixes #37548