godot-extended-libraries / godot-debug-menu

Display in-game FPS/performance/hardware metrics in a Godot 4.x project
https://github.com/godot-extended-libraries/godot-debug-menu-demo
MIT License
429 stars 16 forks source link

Game frezes when call get_tree().quit() #22

Open caioalcn opened 9 months ago

caioalcn commented 9 months ago

Hi,

Tested versions

Reproducible in:

System information

Godot v4.2.1.stable - Windows 11 - v10.0.22631 Build 2263 - Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3050 6GB Laptop GPU

Issue description

When you call the method _gettree().quit() with the "debug menu" addon enabled the game freezes.

Minimal reproduction project (MRP)

test.zip

Calinou commented 9 months ago

This is likely an issue with the thread that's used to request graphics driver version (as this is a slow operation, at least on Linux):

https://github.com/godot-extended-libraries/godot-debug-menu/blob/9d36ea23661d095198ff7fcfff2715172f73c983/addons/debug_menu/debug_menu.gd#L120-L144

This should ideally be fixed upstream so OS.get_video_adapter_driver_info() doesn't take as long on Linux (this should be profiled first with a debug build).

cc @Ark2000