godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.13k stars 19.95k forks source link

In any project using Godot 4.3, disabling Vsync will cause the entire macOS system to freeze and crash #93460

Open Xwdit opened 2 months ago

Xwdit commented 2 months ago

Tested versions

System information

Vulkan Forward+, MacOS 14.4.1 (23E224), Apple M3 Pro, Macbook Pro 2023 later.

Issue description

I've encountered a critical issue with Godot 4.3 on macOS where disabling Vsync in any project results in a complete system freeze and subsequent crash. This problem consistently occurs regardless of the project's complexity or other settings. The system becomes entirely unresponsive, requiring a hard reboot. This behavior poses a significant risk for data loss and interrupts the workflow.

Steps to reproduce

Steps to Reproduce:

  1. Open any project in Godot 4.3 on a macOS system.
  2. Navigate to the project settings.
  3. Disable the Vsync option.
  4. Observe that shortly after disabling Vsync and run the project, the macOS system freezes and crashes.

Minimal reproduction project (MRP)

vsync-crash-macos.zip

snougo commented 2 months ago

Can't reproducible this issue on MacbookPro14 MacOS14.5 M3 Max

Meldanor commented 1 month ago

Can't reproduce it on 4.3beta2 and MacBookPro14 MacOS14.5 M1 Pro 16GB either

clayjohn commented 1 month ago

Can't reproduce with Godot v4.3.beta1 - macOS 13.6.6 - Vulkan (Forward+) - integrated Apple M2 - Apple M2 (8 Threads)

adamscott commented 1 month ago

Can't reproduce with Godot v4.3.beta2 - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M2 - Apple M2 (8 Threads)

@Xwdit Can you try again with a recent version, running this command on the terminal at the same time?

# Will print the current thermal status of the Apple Silicon
# https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/RespondToThermalStateChanges.html
sudo powermetrics --samplers thermal --sample-rate 1000 | grep "Current pressure level:"

We're thinking that maybe it crashes because your laptop is running too hot. On my machine, it stays "Nominal".

Xwdit commented 1 month ago

I recorded a video to demonstrate this issue.

https://github.com/godotengine/godot/assets/44023235/a9f1b1e6-00ad-48b4-be50-be4f7aa69059

Xwdit commented 1 month ago

Can't reproduce with Godot v4.3.beta2 - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M2 - Apple M2 (8 Threads)

@Xwdit Can you try again with a recent version, running this command on the terminal at the same time?


# Will print the current thermal status of the Apple Silicon

# https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/RespondToThermalStateChanges.html

sudo powermetrics --samplers thermal --sample-rate 1000 | grep "Current pressure level:"

We're thinking that maybe it crashes because your laptop is running too hot. On my machine, it stays "Nominal".

I recorded a video to demonstrate this issue.

It will 100% crash in an empty project after disabling vsync, but there are no issues when vsync is enabled; also, this issue cannot be reproduced in version 4.2.

https://github.com/godotengine/godot/assets/44023235/a9f1b1e6-00ad-48b4-be50-be4f7aa69059

Calinou commented 1 month ago

Can you check system temperature while Godot is running with V-Sync off? I suspect an overheating issue, especially since M3 CPUs are more prone to overheating than previous models.

I'm not sure if macOS has built-in utilities for this, but there are surely third-party utilities that can report this information (e.g. in the task bar).

adamscott commented 1 month ago

I'm not sure if macOS has built-in utilities for this, but there are surely third-party utilities that can report this information (e.g. in the task bar).

@Calinou, I shared a command that does just that a few comments before.

@Xwdit Can you try again with a recent version, running this command on the terminal at the same time?

# Will print the current thermal status of the Apple Silicon
# https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/RespondToThermalStateChanges.html
sudo powermetrics --samplers thermal --sample-rate 1000 | grep "Current pressure level:"

We're thinking that maybe it crashes because your laptop is running too hot. On my machine, it stays "Nominal".

Can't reproduce on my new MacBook Pro M3 Max. The temperature stays nominal and nothing dramatic happens. It would really help if you can show the current temperature of your system. Does it feel hot to touch?