-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Deleting shader_cache
causes the project to sometimes freeze on startup
#102615
Comments
Could you check if this bug happens in 4.3 stable and 4.4 beta 2? |
Tried Godot 4.3 beta 2, worked each time (tried about 10 times, zero freezes) |
I can't reproduce this bug on my end, maybe is hardware related. Godot v4.4.beta3 - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated AMD Radeon RX 580 2048SP (Advanced Micro Devices, Inc.; 31.0.21921.1000) - AMD Ryzen 5 3600 6-Core Processor (12 threads) @Alexofp Can you check if this happens with the compatibility renderer? @DarioSamo Any chance this issue be a regression from #102122? |
Tried these things (all on beta 3, each one at least 5 times, 2 cubes with random standard materials, default world enviroment, deleting the shader cache each time): Latest gpu drivers (but was happening before I updated them today, that's the reason why I updated them) Tried the same on Godot Beta 2: If I make it so the cubes are shown one by one (spreading the shader compilations over a few frames), it loads perfectly fine on Forward+ Vulkan on beta 3 |
If I disable a 'Shader Cache' option in the project settings, it runs fine too (beta 3, forward+, vulkan). Takes about 5 seconds to run each time (slower than if shaders are cached) but it never freezes |
Did some more testing Somewhere between these 2 commits is the one that causes it for me. I don't have the stuff setup to compile the engine, sorry, I just used the artifacts that github gives |
Never delete any data related to the project while it is open. Even in other applications unrelated to Godot, doing so can cause unexpected crashes. Every now and then I need to delete data from the user folder, and at that time I make sure the editor is completely closed, but that's just a suggestion 👍 |
shader_cache
causes the project to sometimes freeze on startup
Tested on Linux (Fedora 41) with 4.4.beta3 and an AMD Radeon RX Vega 56 GPU (using Mesa drivers), and I can't reproduce the issue (tried around 20 times). Might be OS / GPU / driver specific. CC @DarioSamo in case you have a hunch as indeed #102122 and #102125 sound potentially related in the above partial bisect result. |
Ubershader thread priority sounds like the more likely one, but that'd probably hint that we have some situation in our Worker Thread Pool implementation that can deadlock itself to death rather than some actual problem from the change itself. The SDFGI change sounds unlikely to me. Does the project in question use SDFGI at all? |
No SDFGI, no world enviroment node at all in fact |
I could reproduce this bug on Windows 10 laptop - Geforce 850M (Driver 572.16) No issues with the beta 1 |
I cannot reproduce this bug on Linux - NVidia RTX 3070 (driver 570.86.15-1) |
Still happens in 4.4 RC1. Latest drivers. |
couldn't reproduce in v4.4.beta3.official [06acfcc] or v4.4.rc1. |
We found a deadlock on 4.4RC3 that might be related to shader generation: Given it relates to WorkerThreadPool, and that shaders get cached, it could be randomly non-reproducible, so I'm willing to bet it wasn't fixed, and it's the same issue as #102877 . Thankfully that issue has stacktraces for the threads, so we now know for certain that there is a deadlock here and what the cause is. |
Yeah, pretty sure its the same issue. This one is probably not needed now, that one has more info anyway |
Can confirm this is fixed after #103506 |
Awesome! Thank you. Closing as fixed by #103506 |
Tested versions
v4.4.beta3.official [06acfcc]
System information
Godot v4.4.beta3 - Windows 10 (build 19045) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 3GB (NVIDIA; 32.0.15.7216) - Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (4 threads)
Issue description
Deleting the 'shader_cache' and 'vulkan' folders leads to the project (sometimes) freezing on load. Only seem to happen if there are multiple complicated materials involved. See the video
2025-02-09.13-43-29.mp4
Steps to reproduce
shader_cache
and 'vulkan' folders from the%appData%/Godot/app_userdata/ShaderFreezeBeta3
Minimal reproduction project (MRP)
shaderfreezebeta3_2025-02-09_13-50-19.zip
(I also included a scene that always loads fine. It starts off with both cubes invisible and makes them visible one by one)
The text was updated successfully, but these errors were encountered: