-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
[C#] Game crashes because of _UnhandledInput when exiting the game with Command + Q on MacOS #83973
Comments
Just stumbled upon this myself on 4.2.1-stable (b09f793). Overriding
|
Update: I've been able to reproduce the original bug reported here by adding and removing the _UnhandledInput override. I'm going to double post this here since I realized my issue is the same as this. I'm getting a similar crash on macOS Sonoma 14.0. It's in Spine's Godot 4.2.2.stable.mono but I'm not reporting there as this bug already occurs in the standard engine build. It seems like during input cleanup, a destructor tries to access a dangling pointer to a mouse cursor that was already freed.
I don't think the root issue has anything to with mouse cursors, audio, or styleboxes as in #92076 - they're merely triggering it. Also looks like it's in the macOS-specific code, & probably C# - specific. I'm using JetBrains Rider, and it only crashes when closing the main window from there or the macOS native executable, not from the Godot editor. |
Probably not the root cause, but as far as I could get. According to this line in Viewport::_gui_input_event, it seems like the viewport tries to continue processing a mouse motion input event after |
Tested on Linux with 4.2.2.stable.mono and 4.3.dev6.mono and couldn't reproduce, but all reports seem to point at a macOS specific issue. Given the number of reports/comments, I'll mark this as confirmed. CC @godotengine/macos @godotengine/dotnet |
I can reproduce it on macOS.
The issue seems to be caused by |
Godot version
v4.1.2.stable.mono.official [399c9dc]
System information
Godot v4.1.2.stable.mono - macOS 14.0.0 - Vulkan (Forward+) - dedicated AMD Radeon Pro 555X - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)
Issue description
Overriding _UnhandledInput on any node makes the game crashes when exiting with Command + Q keyboard shortcut on MacOS. It only happens on exported game or when I'm running from VSCode, using C#. I could not reproduce when running from the editor or using GDScript.
Error message from VSCode:
Steps to reproduce
Minimal reproduction project
reproduce.zip
The text was updated successfully, but these errors were encountered: