godotengine / godotengine/godot
Godot hangs on closing running Forward+ Projects on Certain GPUs
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in:
v4.7.dev1.mono.official [bf95b6258]
v4.7.stable.mono.official [5b4e0cb0f]
v4.7.1.stable.mono.official [a13da4feb]
v4.7.1.stable.official [a13da4feb]
v4.8.dev1.official [ebbf577a0]
Probably everything between 4.7.dev1 and stable (I didn't test them all)
Not reproducible in:
v4.6.3.stable.mono.official [7d41c59c4]
Earlier 4.x builds
### System information
Godot v4.7.1.stable.mono - Ubuntu 24.04.4 LTS 24.04 on X11 - X11 display driver, Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 5050 Laptop GPU - Intel(R) Core(TM) 7 250H (20 threads) - 31.18 GiB memory - PulseAudio (44100 Hz, Stereo/mono)
### Issue description
When I run a project in 4.7, while the project itself runs correctly, as soon as I close it Godot will hang, and can only be closed using the system monitor (which itself can't even fully kill the process but can at least close the window, which leads to my next restart of my computer taking a really long time, but I digress).
I'm aware this is probably a case of "doesn't work on my machine" but I have a history in working in QA and I am more than willing to help with the testing (although I might be slow to get to it at times due to a busy work schedule)
I don't know if it'll help but here is the verbose log from running the attached MRP in 4.8.
```
brian@fawful:~/Downloads$ ./Godot_v4.7.1-stable_linux.x86_64 -v
WorkerThreadPool: 20 threads, 6 max low-priority.
Godot Engine v4.7.1.stable.official.a13da4feb - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
SDL: Init OK!
Accessibility: AccessKit driver loaded.
Xshape 1.1 detected.
Xinerama 1.1 detected.
Xrandr 1.6 detected.
Xrender 0.11 detected.
Xinput 2.2 detected.
XInput: Refreshing devices.
XInput: No touch devices found.
Input method started.
Detecting GPUs, set DRI_PRIME in the environment to override GPU detection logic.
pci id for fd 11: 10de:2d98, driver (null)
pci id for fd 12: 10de:2d98, driver (null)
pci id for fd 13: 10de:2d98, driver (null)
glx: failed to create dri3 screen
failed to load driver: nvidia-drm
Found renderers:
Renderer 0: Mesa Intel(R) Graphics (RPL-P) with priority: 20
Renderer 1: zink Vulkan 1.4(NVIDIA GeForce RTX 5050 Laptop GPU (NVIDIA_PROPRIETARY)) with priority: 0
Using renderer: Mesa Intel(R) Graphics (RPL-P)
Accessibility: window 0 adapter created.
DBus 1.14.10 detected.
FreeDesktopScreenSaver: Acquired screensaver inhibition cookie: 314
Using "default" pen tablet driver...
Shader 'CanvasSdfShaderGLES3' SHA256: d6a78aa13e8f53b9401da247861e9ec1e7ef0b362e764648a366e8e5292b32ed
Shader 'SkeletonShaderGLES3' SHA256: 7400977849507a1f13c26fee0f9bd0ad5890e6a38173044b53fc77c6bc0adae1
Shader 'ParticlesShaderGLES3' SHA256: d7a9481f0752eea5ea53113842d9e8232af30239fe217833fffb0476ac85b771
Shader 'ParticlesCopyShaderGLES3' SHA256: 8c613c267d2c54aa9433e381367504b3e7db87cac71084ac2ea2d7c4b5235524
Shader 'CopyShaderGLES3' SHA256: a9d212b845adbb38cdae3e9ce82a541d740cb782f8f6dfafbb9af20829d13327
Shader 'CubemapFilterShaderGLES3' SHA256: 76e9e13ede32813328417931723d413722fe396b689121fcccc49e04a242365c
Shader 'GlowShaderGLES3' SHA256: 433e1ffc83434b0ea57fe2de42a764302001c61d7e8a288a85eff1583fb63b39
Shader 'PostShaderGLES3' SHA256: 56b4d39f88046c1a901ccd8885bde1cbb5b64e1f9a78322ed26dd63f986b398f
Shader 'FeedShaderGLES3' SHA256: d874145a0c0a3f672f3114419360c6e282c9ddfbe85ed65fb7077bcb5648a973
Shader 'CanvasShaderGLES3' SHA256: 58c7c759d6115825b71c43510c4eb63c966d5d4d6987c8ae978a8e89f91df4fb
Shader 'CanvasOcclusionShaderGLES3' SHA256: f47f9bd7d3c6eabcf89c827b1b43c637ae5db3ddb02440f974791a9a58788196
Shader 'SceneShaderGLES3' SHA256: 59c8ee9e7de2c5f05a96f47ed4f352dcfb69540f0efb422b5a4a0be45ef96266
Shader 'SkyShaderGLES3' SHA256: 6b5dc7815fefc4c29f68e0e620e44d44edbd5948b162956a48a2a0e4158b0ac3
Shader 'TexBlitShaderGLES3' SHA256: 0aaf6e216d326c2b1c2e89562d8a8b4b2e1fc2d4d9b3534a5bba891eab6593c2
OpenGL API 4.6 (Core Profile) Mesa 25.2.8-0ubuntu0.24.04.2 - Compatibility - Using Device: Intel - Mesa Intel(R) Graphics (RPL-P)
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 3769296884
EDITOR API HASH: 3146738256
SceneTreeFTI: traversal method DEFAULT
Loading resource: /home/brian/.config/godot/editor_settings-4.7.tres remapped: /home/brian/.config/godot/editor_settings-4.7.tres
Completed load for: '/home/brian/.config/godot/editor_settings-4.7.tres' remapped '/home/brian/.config/godot/editor_settings-4.7.tres' at thread -1
EditorSettings: Load OK!
EditorTheme: Generating new theme for the config '3136860914'.
EditorTheme: Generating new icons.
EditorTheme: Generating new fonts.
EditorTheme: Generating new styles.
PortalDesktop: org.freedesktop.portal.FileChooser version 3 detected, version 3 required.
Loaded system CA certificates
FreeDesktopScreenSaver: Released screensaver inhibition cookie: 314
thirdparty/mbedtls/library/ssl_tls13_generic.c:1591: 0x18096008: Perform PSA-based ECDH/FFDH computation.
thirdparty/mbedtls/library/ssl_tls13_client.c:1954: 0x18096008: Switch to handshake keys for inbound traffic
thirdparty/mbedtls/library/ssl_tls13_generic.c:0442: 0x18096008: mbedtls_ssl_tls13_process_certificate_verify() returned 0 (-0x0000)
thirdparty/mbedtls/library/ssl_tls13_client.c:2659: 0x18096008: Switch to handshake traffic keys for outbound traffic
thirdparty/mbedtls/library/ssl_tls13_generic.c:1274: 0x18096008: Switch to application keys for inbound traffic
thirdparty/mbedtls/library/ssl_tls13_generic.c:1277: 0x18096008: Switch to application keys for outbound traffic
ERROR: Error loading image: '/home/brian/Games/dkrr-(4.1)/icon.svg'.
at: load_image (core/io/image_loader.cpp:102)
Accessibility: window 1 adapter created.
Accessibility: window 1 adapter initial update completed.
Accessibility: window 1 adapter deactivation completed.
Accessibility: window 1 adapter destroyed.
Editing project: /home/brian/Games/Mrp
Godot Engine v4.7.1.stable.official.a13da4feb - https://godotengine.org
EditorSettings: Save OK!
XR: Clearing primary interface
XR: Removed interface "Native mobile"
XR: Removed interface "OpenXR"
Accessibility: window 0 adapter destroyed.
brian@fawful:~/Downloads$ Vulkan 1.4.329 - Forward+ - Using Device #1: NVIDIA - NVIDIA GeForce RTX 5050 Laptop GPU
Godot Engine v4.7.1.stable.official.a13da4feb - https://godotengine.org
Vulkan 1.4.329 - Forward+ - Using Device #1: NVIDIA - NVIDIA GeForce RTX 5050 Laptop GPU
```
``
### Steps to reproduce
1. Load any project that uses the Forward+ Renderer
2. Run it
3. Close the running Window
4. Godot will hang.
I assume these steps won't work on every computer (I have no other computers I can test on) but probably require the same/similar GPU/driver.
### Minimal reproduction project (MRP)
[Mrp.zip](https://github.com/user-attachments/files/30127492/Mrp.zip)
Contributor guide
Research direction
Start with the attached Mrp.zip and reproduce the Forward+ run-and-close sequence on the reported Ubuntu 24.04/X11 and NVIDIA RTX 5050 setup. Compare behavior with 4.6.3 and 4.7.1, and inspect the verbose log around Vulkan startup and shutdown; done means the running project closes without leaving Godot hung.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, ubuntu
- Domain
- computer-graphics, desktop-dev, game-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100