-
-
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
OSX/M1 window resizing crashes the engine when rendering thread model is set to multi-threaded #81402
Comments
Also happening in 3.6 beta 3. |
Fixed by #81442. |
TL;DR: Huge stability improvement, but I still get reports of crashes in production. Unfortunately, it seems that this was not the root cause. While the #81442 does greatly reduce the rate of crashes (from "in a second" from before the patch to "in few minutes if you play with setting" after the patch), there seems to be another underlying problem that causes the instability, and disabling the live resize just makes it not immediately apparent. It seems that window resizing still has a small chance of crashing the engine, but after the patch we are just not resizing 60 times per second. I am unable to replicate this anymore with a minimal project, but it does still happen in production. If you grab the free demo build from itch.io, enter the settings and either keep changing the fullscreen mode, or set the mode to windowed and keep resizing the window (and releasing the mouse button), it will cause a crash in a dozen of tries or so on an M1 system. The |
The crash seems to be caused by particles processing (deep inside the GPU driver after the
|
As a workaround, I would probably disable GPUParticles rendering on macOS when not using ANGLEMetal if using the Multi-Threaded model (and print a warning). |
If this is caused by particles, and disabling such particles fixes the issue, an approach that seems reasonable is to blanket-disable all GPUParticles when the resize procedure starts and then re-enable them when it finishes. I could probably implement that on the game side, but this is a nasty gotcha for anybody developing cross-platform, so it should probably be either prominently documented or handled on the engine side. |
Godot version
3.5.2
System information
MacBook Air M1 2020 8GB Sonoma 14.0
Issue description
On some M1 Mac systems, setting the rendering thread model to multi-threaded causes the engine to crash when the window size is changed.
This seems to be a race condition and gets progressively worse when the game is actually doing stuff - to the point where a game like ΔV: Rings of Saturn will crash on any attempt to resize the window or switch between full-screen and windowed modes. I have verified that adding a command line of
--render-thread safe
fixes the problem, so I'm confident that it's caused by the multi-threaded rendering model.You can replicate this with an empty project without code - it just requires more vigorous mouse movements to trigger.
Steps to reproduce
This replicates only on M1 Macs.
MRP attached.
Minimal reproduction project
mrp.zip
The text was updated successfully, but these errors were encountered: