Skip to content
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

[Tracker] Vulkan error unable to create swapchain (device lost) happening randomly #71929

Open
5 of 15 tasks
clayjohn opened this issue Jan 23, 2023 · 148 comments
Open
5 of 15 tasks

Comments

@clayjohn
Copy link
Member

clayjohn commented Jan 23, 2023

Godot version

4.0 beta14 and earlier and likely later

System information

Most users are on Windows, some on Linux, variety of GPUs (intel, nVidia and AMD)

Issue description

I am opening this tracker issue as a central place to track a bug that seems to be plaguing a variety of users. The bug occurs quite randomly, but appears to be most often connecting with complex shaders and/or updating uniforms.

The bug leads to a freeze or crash when updating swap buffers along with the following errors:

E 0:00:01:0015   VulkanContext::swap_buffers: Condition "err" is true. Returning: ERR_CANT_CREATE
  <C++ Source>   drivers\vulkan\vulkan_context.cpp:2299 @ VulkanContext::swap_buffers()
E 0:00:01:0016   VulkanContext::prepare_buffers: Vulkan: Did not create swapchain successfully.
  <C++ Error>    Condition "err != VK_SUCCESS" is true. Breaking.
  <C++ Source>   drivers\vulkan\vulkan_context.cpp:2222 @ VulkanContext::prepare_buffers()

For some users these errors spam the console while the engine itself is frozen.

This issue is very difficult to debug as it is near impossible to reproduce reliably for people other than the affected users.

Tasks

  1. archived bug topic:rendering
  2. archived bug crash topic:rendering
  3. bug topic:editor topic:shaders
  4. bug crash topic:rendering
  5. archived bug platform:windows topic:rendering
  6. bug confirmed regression topic:3d topic:rendering topic:thirdparty
  7. bug crash topic:rendering
  8. bug crash platform:linuxbsd regression topic:rendering topic:thirdparty
  9. bug crash needs testing topic:rendering
  10. bug crash topic:rendering
  11. bug topic:rendering
  12. bug platform:windows topic:physics topic:rendering
  13. archived bug topic:rendering
  14. bug confirmed crash topic:rendering

Steps to reproduce

Steps to reproduce can be found in individual reports

Minimal reproduction project

See individual reports

@Calinou
Copy link
Member

Calinou commented Jan 23, 2023

Should we force the engine to close in this situation, rather than trying to recreate the swapchain endlessly? As far as I know, there is no way to recover from this situation (not until the renderer can be restarted at run-time).

Also, the error message should be tweaked to indicate most likely causes (bugs in graphics drivers).

@clayjohn
Copy link
Member Author

Should we force the engine to close in this situation, rather than trying to recreate the swapchain endlessly? As far as I know, there is no way to recover from this situation (not until the renderer can be restarted at run-time).

Also, the error message should be tweaked to indicate most likely causes (bugs in graphics drivers).

I'm not sure. First we need to investigate what is causing the error in the first place. Most of the impacted users report driver updates not resolving the issue for them. So it is more likely an issue on our end.

@Frontrider
Copy link

Frontrider commented Feb 3, 2023

Popped up with beta 17. As long as you can't fix it/find what it is, I'd be happier if it tried to save my last open edits and crashed instead of an error spam.

My error lines are:

ERROR: Vulkan: Did not create swapchain successfully.
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2267)
ERROR: Condition "err" is true. Returning: ERR_CANT_CREATE
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2344)

And the info message from the start of the editor:

Godot Engine v4.0.beta17.official.c40020513 - https://godotengine.org
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 2060

@InfiniteProductions
Copy link

As mentioned in #60755, I can help as I have 100% reproducible case (summary: launch editor, put computer to sleep, wake it up later, try to use any UI component => I got a "winner")

Feel free to give me some debug code to run, patched version of Godot with additional debug code, anything which could help. I'm still not convinced it could solve all cases users have encountered with all OSes & hardware involved but it could narrow it down at least.

For the record I have some older version of Visual Studio Community (latest is 2019) installed and never tried yet to compiled Godot from source, but I may give it a try if it could help.

@Frontrider
Copy link

Frontrider commented Feb 8, 2023

As mentioned in #60755, I can help as I have 100% reproducible case (summary: launch editor, put computer to sleep, wake it up later, try to use any UI component => I got a "winner")

Yap, that is a good way to get it to happen. With beta 17 it sometimes happens, sometimes does not. (I can get the computer to go to sleep without it happening)

@clayjohn
Copy link
Member Author

clayjohn commented Feb 8, 2023

@InfiniteProductions @Frontrider That is great to hear!

We just merged a change that made it into RC1 that will provide more debug information on crash.

So could one of you test RC1 running from the command line, reproduce the crash and then tell me what it says? It should have error messages like in the original post here, except there should be an error code reported as well

@InfiniteProductions
Copy link

@InfiniteProductions @Frontrider That is great to hear!

We just merged a change that made it into RC1 that will provide more debug information on crash.

So could one of you test RC1 running from the command line, reproduce the crash and then tell me what it says? It should have error messages like in the original post here, except there should be an error code reported as well

I start using this release, but (un)fortunately, the issue no longer occurred in the same scenario !
I'll try to test again with beta17 and post update here.

@Frontrider
Copy link

Could not reproduce so far, I can give more details in a few days.

@frtp2612
Copy link

frtp2612 commented Feb 10, 2023

@InfiniteProductions @Frontrider That is great to hear!

We just merged a change that made it into RC1 that will provide more debug information on crash.

So could one of you test RC1 running from the command line, reproduce the crash and then tell me what it says? It should have error messages like in the original post here, except there should be an error code reported as well

I just reproduced the issue on rc-1 after 48 minutes of engine usage. The message is different from the ones so far though.

Here is the error:
crash

@InfiniteProductions
Copy link

aarrgghh I just got one but console goes away with the editor when closing it ! It could be great to have a log file somewhere instead of this console OR keep it open. I'll try again later.

@ComputerGiraffics
Copy link

Getting this error in Godot 4 RC1 when trying to load the DM1-2 map in Liblast, https://libla.st/:

Godot Engine v4.0.rc1.official.8843d9ad3 - https://godotengine.org
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1050 Ti
E 0:00:33:0319   swap_buffers: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
  <C++ Error>    Condition "err" is true. Returning: ERR_CANT_CREATE
  <C++ Source>   drivers/vulkan/vulkan_context.cpp:2351 @ swap_buffers()
E 0:00:33:0324   prepare_buffers: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
  <C++ Error>    Condition "err != VK_SUCCESS" is true. Breaking.
  <C++ Source>   drivers/vulkan/vulkan_context.cpp:2274 @ prepare_buffers()

@InfiniteProductions
Copy link

Using the same release:

$ Godot Engine v4.0.rc1.official.8843d9ad3 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 425.31 - Compatibility - Using Device: NVIDIA Corporation - GeForce GTX 780M

I've got only these lines:

ERROR: Resources still in use at exit (run with --verbose for details).
at: clear (core/io/resource.cpp:489)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
at: (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
at: (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_ERROR_VALIDATION_FAILED_EXT
at: (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
...
(infinite ? number of messages until Godot is closed)
...
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
at: (drivers/vulkan/vulkan_context.cpp:2351)
WARNING: Scan thread aborted...
at: _notification (editor/editor_file_system.cpp:1224)

It doesn't looks like to be a "crash" as @clayjohn wrote. So no luck to get more debug info.

@Frontrider
Copy link

Frontrider commented Feb 15, 2023

Same. I just got it. Editor was left open in the background, it was still rc1. I'll try to replicate on rc2.

ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2351)

Try launching other full screen applications/games while godot is in the background. That might yield usable results.

@Squatnet
Copy link

I'm having this on RC2, interspersed with random gibberish

ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: (drivers/vulkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchaEiRnR OsRu:c cVeuslskfaunl:l yD.i dE rnrootr  ccroedaet:e  VsKw_aNpOcTh_aiRnEA DsYu
cc e s saftu:l l(yd.r iEvrerrosr/ vcuoldkea:n /VvKu_lNkOaTn__RcEoAnDtYe
x t . captp:: 2(2d7r4i)v
ers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Did not cErReRaOtRe: s wVauplckhaani:n  Csauncncoets ssufbumlilty .g rEarprhoirc sc oqduee:u eV.K _ENrOre
:   V Ka_tE:R R(OdRr_iDvEeVrIsC/Ev_uLlOkSaTn
/ v u lakta:n _(cdornitveexrts./cvpupl:k2a2n7/4v)u
lkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: (drivers/vulkan/vulkan_context.cpp:2274)
ERROR: Vulkan: Cannot submit gErRaRpOhRi:c sV uqlukeaun:e.  CEarnrnoort  csoudbem:i tV Kg_rEaRpRhOiRc_sD EqVuIeCuEe_.L r
o r   caotd:e :( dVrKi_vEeRrRsO/Rv_uDlEkVaInC/Ev_uLlOkSaTn
_ c o natte:x t(.dcrpipv:e2r3s5/1v)u
lkan/vulkan_context.cpp:2351)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: (drivers/vulkan/vulkan_context.cpp:2274)

I'm not sure if it makes any difference but i did switch from compatability to forward renderer, my project also makes heavy use of shaders, but runs absolutely fine in compatibility.

Windows 11, RTX 3060

@Frontrider
Copy link

Just got the error on rc5. Same game, left the editor open for a while in the background, then the screen was turned off. No sleep mode, no nothing.

Godot Engine v4.0.rc5.official.6296b4600 - https://godotengine.org
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 2060

....

ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2280)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2357)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2280)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2357)

@hammerandtongs
Copy link

hammerandtongs commented Mar 7, 2023

I'm getting this error suddenly with godot 4 final

Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
LOG in xrCreateInstance: Instance created
        createInfo->applicationInfo.applicationName: Godot XR Tools Demo
        createInfo->applicationInfo.applicationVersion: 1
        createInfo->applicationInfo.engineName: Godot Game Engine
        createInfo->applicationInfo.engineVersion: 40000
        appinfo.detected.engine.name: (null)
        appinfo.detected.engine.version: 0.0.0
        quirks.disable_vulkan_format_depth_stencil: false
LOG in xrCreateInstance: Selected devices
        Head: 'Valve Index (libsurvive)'
        Left: '<none>'
        Right: '<none>'
        Hand-Tracking Left: '<none>'
        Hand-Tracking Right: '<none>'
OpenXR: Running on OpenXR runtime:  Monado(XRT) by Collabora et al 'v21.0.0-2877-g5380b6c1'   21.0.0
OpenXR: XrGraphicsRequirementsVulkan2KHR:

Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
LOG in xrCreateInstance: Instance created
        createInfo->applicationInfo.applicationName: Godot XR Tools Demo
        createInfo->applicationInfo.applicationVersion: 1
        createInfo->applicationInfo.engineName: Godot Game Engine
        createInfo->applicationInfo.engineVersion: 40000
        appinfo.detected.engine.name: (null)
        appinfo.detected.engine.version: 0.0.0
        quirks.disable_vulkan_format_depth_stencil: false
LOG in xrCreateInstance: Selected devices
        Head: 'Valve Index (libsurvive)'
        Left: '<none>'
        Right: '<none>'
        Hand-Tracking Left: '<none>'
        Hand-Tracking Right: '<none>'
OpenXR: Running on OpenXR runtime:  Monado(XRT) by Collabora et al 'v21.0.0-2877-g5380b6c1'   21.0.0
OpenXR: XrGraphicsRequirementsVulkan2KHR:
 - minApiVersionSupported:  1.0.0
 - maxApiVersionSupported:  1023.1023.1023
LOG in xrCreateVulkanInstanceKHR: Creation of VkInstance:
        result: VK_SUCCESS
        vulkanInstance: 0x65d84c0
        extensions:
                VK_KHR_external_fence_capabilities
                VK_KHR_external_memory_capabilities
                VK_KHR_external_semaphore_capabilities
                VK_KHR_get_physical_device_properties2
                VK_KHR_surface
                VK_KHR_xlib_surface
Vulkan API 1.3.230 - Forward+ - Using Vulkan Device #0: AMD - AMD Radeon RX 6900 XT (RADV NAVI21)
LOG in xrGetVulkanGraphicsDeviceKHR: Creation of VkDevice:
        result: VK_SUCCESS
        vulkanDevice: 0x66658f0
        vulkanInstance: 0x65d84c0
        external_fence_fd: true
        external_semaphore_fd: true
        timelineSemaphore: true
        extensions:
                VK_KHR_dedicated_allocation
                VK_KHR_external_fence
                VK_KHR_external_memory
                VK_KHR_external_semaphore
                VK_KHR_get_memory_requirements2
                VK_KHR_external_memory_fd
                VK_KHR_16bit_storage
                VK_KHR_create_renderpass2
                VK_KHR_fragment_shading_rate
                VK_KHR_image_format_list
                VK_KHR_incremental_present
                VK_KHR_maintenance2
                VK_KHR_multiview
                VK_KHR_shader_float16_int8
                VK_KHR_storage_buffer_storage_class
                VK_KHR_swapchain
                VK_KHR_external_semaphore_fd
                VK_KHR_external_fence_fd
                VK_KHR_timeline_semaphore

ERROR: Interface not found.
   at: find_interface (servers/xr_server.cpp:224)
OpenXR: Configuring interface
ERROR: Condition "swapchainImageCount != sp_image_count" is true. Returning: ERR_BUG
   at: _update_swap_chain (drivers/vulkan/vulkan_context.cpp:1980)
free(): double free detected in tcache 2
Aborted (core dumped)

@speakk
Copy link

speakk commented Mar 9, 2023

For me this reproduces 100% reliably when I leave Godot on when I put my laptop to sleep.
I get in an endless loop:

ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2280)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2357)

OS: Linux (Arch Linux, up to date)
GPU: NVidia (NVIDIA Corporation GA104GLM [RTX A3000 Mobile])

@Frontrider
Copy link

@speakk what distro? That might be another useful but of info.

@speakk
Copy link

speakk commented Mar 9, 2023

Edited my post to add the distro.

@Jigglyy
Copy link

Jigglyy commented Mar 9, 2023

Occurs to me also, on Windows 10, 1070 Ti, 2700X, latest drivers

@lorenuars19
Copy link

The question is how could we debug this further, or is it coming from the driver rather then godot itself ?

@clayjohn
Copy link
Member Author

clayjohn commented Mar 14, 2023

The question is how could we debug this further, or is it coming from the driver rather then godot itself ?

Well, its difficult to say. We don't have clear reproducible cases yet. When this error occurs varies wildly between person to person. Some users get it consistently, others get it randomnly. For some it is fixed with a driver update, for others not.

My guess is that somewhere in the core Vulkan code we are doing something outside of the Vulkan specification which results in the device getting lost. The trouble is very few contributors have the deep knowledge about Vulkan required to debug this, further very few people are able to reproduce it, which makes it even harder to debug.

Edit: To add to this, if you can reliably reproduce the issue, please try running your application from the command line and using the --gpu-validation and --verbose command line arguments. Run the project directly, do not go through the project manager.

@terminal-start
Copy link

I tried @SimantoR 's "fix" and seems to have solved it? Can anyone else confirm?

@ranger-x-dev
Copy link

I have this issue occasionally. I notice it more frequently when Windows loses focus of the game window when alt-tabbing out.

@Zed-z
Copy link

Zed-z commented Apr 13, 2024

[4.2.1] The issue happens very often on my laptop with a dual AMD GPU. It happens on Forward+ and Mobile, switching to Compatibility makes the issue go away, as well as @SimantoR's solution.

A quick way to trigger this seems to be playing around with sliders when changing a node's Modulate.

@SimantoR
Copy link

It definitely is windowing. This bug still occures even with Single Window mode when changing screens or just maximizing and un-maxmixing the main window too fast

@jordanmichaelrushing
Copy link

Been happening to me moving around a low poly rock and I have a "warping" shader going on in my scene as well (never caused an issue before but I'm wondering if that is the cause all of a sudden). Console first returns a popup: Renderer encountered an unexpected error: -2003238900. Then after I click ok I get:

Godot Engine v4.2.1.stable.mono.official.b09f793f5 - https://godotengine.org
OpenGL API 3.3.0 Core Profile Context 24.3.1.240312 - Compatibility - Using Device: ATI Technologies Inc. - AMD Radeon T

Editing project: C:/Users/Jordan/code/Element Racers - Veggie Vendetta
Godot Engine v4.2.1.stable.mono.official.b09f793f5 - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Vulkan devices:
  #0: AMD AMD Radeon RX 5600 XT - Supported, Discrete
Vulkan API 1.3.277 - Forward+ - Using Vulkan Device #0: AMD - AMD Radeon RX 5600 XT
Optional extension VK_KHR_fragment_shading_rate not found
Optional extension VK_KHR_incremental_present not found
Optional extension VK_GOOGLE_display_timing not found
- Vulkan Variable Rate Shading not supported
- Vulkan multiview supported:
  max view count: 6
  max instances: 4294967295
- Vulkan subgroup:
  size: 64
  min size: 32
  max size: 64
  stages: STAGE_VERTEX, STAGE_TESSELLATION_CONTROL, STAGE_TESSELLATION_EVALUATION, STAGE_GEOMETRY, STAGE_FRAGMENT, STAGE
  supported ops: FEATURE_BASIC, FEATURE_VOTE, FEATURE_ARITHMETIC, FEATURE_BALLOT, FEATURE_SHUFFLE, FEATURE_SHUFFLE_RELAD
  quad operations in all stages
Using present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
Startup PSO cache (3.3 MiB)
Using "winink" pen tablet driver...
Creating VMA small objects pool for memory type index 0
Shader 'CanvasSdfShaderRD' (group 0) SHA256: 03b8e72e0444232c3528f6283b90199d9e315eb40ded32eb954552c61ff02282
Shader 'SkeletonShaderRD' (group 0) SHA256: 307f31a0b56fc200a1f42aa4ba15e8f849522badee9e99b376f18b6b6e87eca9
Shader 'SortShaderRD' (group 0) SHA256: a4b380c5dcc59d498b95022915ed9e8f94ba1e5e19d2f4c8e6e1b4c051b7a8fc
Shader 'ParticlesShaderRD' (group 0) SHA256: d68b791e485bccfe2e6e723ea885762251ad8024259b7481af66d2229c9f10cc
Shader 'ParticlesCopyShaderRD' (group 0) SHA256: b44896f2dc2ced325cd6dc1bcef54982a20bd3953bd9d35c59eb9ee8b9da6067
Shader 'CanvasShaderRD' (group 0) SHA256: f7cb887512e3f10010900699c3157bd93c8889076656a7f10b9d2d5673de93a3
Shader 'CanvasOcclusionShaderRD' (group 0) SHA256: f1689e48c7087f3bd8b9798b953644d3f3bec98105fdb51ed93dfab19d6a56c5
Shader 'ClusterRenderShaderRD' (group 0) SHA256: cadbfc63cd43593b680ced7a13ceb97789a6e8f5a1ec7281dad829a9c5dae9f8
Shader 'ClusterStoreShaderRD' (group 0) SHA256: dae82dda844b53016c79c8fb8bf8eba75c7864472ffb835af9c088195830aed6
Shader 'ClusterDebugShaderRD' (group 0) SHA256: 723f8891ad6f3ed73a18a11b882bc727ab53d75244abf1d1d370bbb621214798
Shader 'SceneForwardClusteredShaderRD' (group 0) SHA256: 50092b877f82dfd8fd26c46949bacd49ca40df268814bf030aa4f664383a79a
Shader 'SceneForwardClusteredShaderRD' (group 1) SHA256: b3287e31c35c9ba565fef0f6e0277fccdb062ac4a0300237b76d98c41f1fb62
Shader 'SceneForwardClusteredShaderRD' (group 2) SHA256: 821ff8ec8913db7f6ce33842286170d0dc36772f5215250614a14530a3e5670
Shader 'SceneForwardClusteredShaderRD' (group 3) SHA256: 9ca193b3f25aa62302ff6e619c1aad332e85d83d06c173fa469ad944397c60a
Shader 'ResolveShaderRD' (group 0) SHA256: 065c40b43222e98f955b21dea0928ac016767c75fdb2040294730379aa4c0153
Shader 'TaaResolveShaderRD' (group 0) SHA256: 866c7e9f4fb872cd94e41633a0f46baa81c8da60ac1ddff356fa148c255bb347
Shader 'Fsr2DepthClipPassShaderRD' (group 0) SHA256: 6795f23f7371fbba28edf13218d7e8790187b1c9d279a5eb0549e103188b1b5e
Shader 'Fsr2ReconstructPreviousDepthPassShaderRD' (group 0) SHA256: bcc24e5dac1102a0c26f50a7baef21e5a27f39d7a4ba1562d2d5
Shader 'Fsr2LockPassShaderRD' (group 0) SHA256: 2b3b7b9418819d97800de570018d624621ad71d1cccae0584fafdb532de59536
Shader 'Fsr2AccumulatePassShaderRD' (group 0) SHA256: 99fc2baa0954df5caf5590ae4e814cd13ce524c5aa9b62092d979eeb6b6509b4
Shader 'Fsr2RcasPassShaderRD' (group 0) SHA256: f71b691733498d229ef34effabf757c5be7a06667f99fe305060c44a84d6dab1
Shader 'Fsr2ComputeLuminancePyramidPassShaderRD' (group 0) SHA256: 06abe3d46d6f20a00e50b25be8935f6184e074c9e8ceda7bee6c5
Shader 'Fsr2AutogenReactivePassShaderRD' (group 0) SHA256: 2f9e602b75331637f70d530df79ae59d2d4f09387f82c6a9f98c94d8f4c78
Shader 'Fsr2TcrAutogenPassShaderRD' (group 0) SHA256: 6cc4de29bdd9d04975d2819d8efbad10bc5e0c594703e1c5cc90de510fc59a94
Shader 'SsEffectsDownsampleShaderRD' (group 0) SHA256: acb65995615adb405b9bc3687d2debba1c95c5afd99001f15a161921865e342f
Shader 'SsilShaderRD' (group 0) SHA256: 5f2e380c265a9c6972f3dab815bb42860ce14cf0765ab5543d52dbf0de57a483
Shader 'SsilImportanceMapShaderRD' (group 0) SHA256: 78436bcf6ae25f2e7c9215d884a364fcb8c1af3276a4dd403278dc03268ebfe5
Shader 'SsilBlurShaderRD' (group 0) SHA256: 0a41f846bf9f52762e0848ececd808a6f232bad746e352ef75677464abdb0fb9
Shader 'SsilInterleaveShaderRD' (group 0) SHA256: fc2b7f2c16cf51cb203eec861bf9e24f225bc03c604759cbc06c10fa3d1ffe60
Shader 'SsaoShaderRD' (group 0) SHA256: 83b73ca5925d6c83d5cf2f4a1a315627ce4c8f0f0879fdd8a93aacfc2b82f91b
Shader 'SsaoImportanceMapShaderRD' (group 0) SHA256: c2773991ef08db2706e522ab13cd2337c1a33f6c650c6138fe58080030d7cb61
Shader 'SsaoBlurShaderRD' (group 0) SHA256: f5e67a4f9ed56dc7f12a0e78851822288350fb956ec6e54c9d5c866779a20a42
Shader 'SsaoInterleaveShaderRD' (group 0) SHA256: ae7a509ca92e3ecb76f5c67c3fccabd02e85cb9595a37989e954e6d7c11ba4e4
Shader 'ScreenSpaceReflectionScaleShaderRD' (group 0) SHA256: 2d6891efd86789d8870fc449f7754b7ce3556e80661866d073ecb66524
Shader 'ScreenSpaceReflectionShaderRD' (group 0) SHA256: 418610d0fdc3b736e619d39c0ae3601d1dceee2c12cb4d083234b04ee201243
Shader 'ScreenSpaceReflectionFilterShaderRD' (group 0) SHA256: ce891968c906b8286e971d91d9ee28b0c5f97ad29e612be86eb2a957e
Shader 'SubsurfaceScatteringShaderRD' (group 0) SHA256: dc42ab0796df927a91c4d45481a4a160dfebfa4ae972f29001fb2a1eddaba951
Shader 'SkyShaderRD' (group 0) SHA256: 2232ca07d0548b4fea909af025562b080435b19d12292e08e320ecab30fdaf30
Shader 'VoxelGiShaderRD' (group 0) SHA256: 0774f023fb37d8a83bfa6c908e616ebeb32578939bd8583ff547a59d350dd013
Shader 'VoxelGiDebugShaderRD' (group 0) SHA256: ce1ec97b6699ab64506928fe636518d1f4dfdef86b9666073ce8a6e1c0124f45
Shader 'SdfgiPreprocessShaderRD' (group 0) SHA256: bf9c1bbb77a395a7ee39b151d56e4b24a24bdef97fe99ca9ac3de103965aa499
Shader 'SdfgiDirectLightShaderRD' (group 0) SHA256: 6f68331da00022616cf465e01e42e59038718b4d2a6c910f73be98d30559a87d
Shader 'SdfgiIntegrateShaderRD' (group 0) SHA256: ea3465acbbcfd53dd996aa7302e5a748e98a0900846bb1758b39aa94fa9bda98
Shader 'GiShaderRD' (group 0) SHA256: 9a0943ad53c9d41fe342600f005607696d4f733ea558f594767fdfa0b907de5c
Shader 'SdfgiDebugShaderRD' (group 0) SHA256: e724f51585ef711d10d7a67e9dca7bc180749310a0adbc06571ecc2a62d0d932
Shader 'SdfgiDebugProbesShaderRD' (group 0) SHA256: 98cd3760e4899f6e1aca12dc2c65c88ae6bbb52aec2028d285a56625f4182dcf
Shader 'VolumetricFogShaderRD' (group 0) SHA256: 4c351a97caa79103a14bcfaaea505ff5b8197e46f4fb4b824edeb41f1c223362
Shader 'VolumetricFogProcessShaderRD' (group 0) SHA256: ed8ca6b4dfed35c5dd7ecc45b386e83f405aabc799821fcd591df0b9720ad343
Shader 'BokehDofShaderRD' (group 0) SHA256: 8c5900b20b88d946a5ce8726c5698a77cce129da63de78e2f54f943b92ab4d54
Shader 'CopyShaderRD' (group 0) SHA256: 1732ae2d6d0e9ff0924a48572babbee8786f192f28a1d77bff3bbf3f38cfaca3
Shader 'CopyToFbShaderRD' (group 0) SHA256: e3863dd3817f2c1fc4ff4fd53abce86c09f306b4cb48c487e72bb95c8019e5e9
Shader 'CubeToDpShaderRD' (group 0) SHA256: c82081e768d7422fd64fef32da36cc4c569158b8a8086708a59e7b4dd9bcc80d
Shader 'CubemapDownsamplerShaderRD' (group 0) SHA256: 6f1fac6715a50170b32f13dc2a6192d684525582e9eb11663d894ce8d82b2591
Shader 'CubemapFilterShaderRD' (group 0) SHA256: 8da5dea6022f6c40888501014159cbf2021958c39c65b7d5af25d757ec6b6f63
Shader 'CubemapRoughnessShaderRD' (group 0) SHA256: 9dcd290df8589e87d2db7ecebba7fc931a7c47d0df1cfe3a0eeaf69434af4dd1
Shader 'SpecularMergeShaderRD' (group 0) SHA256: 95864a15d21fdb3743e119b6882dfba97253d2bcb879c6d8db260c3ff6a18799
Shader 'ShadowFrustumShaderRD' (group 0) SHA256: dab449e2ac2ad7c40febf8650634838e652ef2075e41bf90a2836eb994e340b9
Shader 'MotionVectorsShaderRD' (group 0) SHA256: 6b0274f68d7a8c2f95f4f3f8e8e511101105669933b8b6ef084953229ffd3e0c
Shader 'LuminanceReduceShaderRD' (group 0) SHA256: 5c77e87704ae77ed8074c206a8468488bb9d18c3b52611835e9687e391ebb452
Shader 'TonemapShaderRD' (group 0) SHA256: f35184ce24260b305c9572025cf5f64f8ca4af86618c1ce4278087745dee948a
Shader 'FsrUpscaleShaderRD' (group 0) SHA256: b0a2c443aed1917a8eec4fb2158f704a2865aedd508d65bfdb6a6e13895e574d
Shader 'BlitShaderRD' (group 0) SHA256: 4b7fbc2eeec8c398f117d4aa51788282006c76e7b29838c82722d011cc3ef4a3
WASAPI: Activated output_device using IAudioClient3 interface
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 48000
WASAPI: nAvgBytesPerSec = 384000
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: mix_rate = 48000
WASAPI: fundamental_period_frames = 480
WASAPI: min_period_frames = 480
WASAPI: max_period_frames = 480
WASAPI: selected a period frame size of 480
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 480 calculated latency: 10ms

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
.NET: Initializing module...
Found hostfxr: C:\Program Files\dotnet\host/fxr/8.0.1/hostfxr.dll
.NET: hostfxr initialized
.NET: GodotPlugins initialized
CORE API HASH: 2728314392
EDITOR API HASH: 3722019024
EditorSettings: Load OK!
Found .NET Sdk version '8.0.101': C:\Program Files\dotnet\sdk\8.0.101
Loaded system CA certificates
Creating VMA small objects pool for memory type index 3
EditorSettings: Save OK!
plugin.gd: HTerrain plugin Enter tree
plugin.gd: DPI scale: 1.5
image_file_cache.gd: Image cache session ID: 5592473109348965
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: (drivers/vulkan/vulkan_context.cpp:2536)
ERROR: Condition "err" is true. Returning: ERR_CANT_CREATE
   at: _update_swap_chain (drivers/vulkan/vulkan_context.cpp:1958)
ERROR: Condition "err" is true. Returning: ERR_CANT_CREATE
   at: _update_swap_chain (drivers/vulkan/vulkan_context.cpp:1958)

This is also AFTER changing to single window mode btw. So this doesn't seem to have fixed my issue. I'm staying on my Godot editor and it's happening while I'm moving things around. I can also repeat it pretty consistently where it currently is. I'm going to make a copy of it's current state so I can come back to it if someone wants to pair to figure out what is happening and so I can (hopefully) try to go back to working on building my racing game.

GPU: RX 5600 XT
CPU: Ryzen 7 3700X
Memory: 64GB

@clayjohn
Copy link
Member Author

For those encountering this issue recently. Can you try the same projects in 4.3 dev 5? (after making a backup of course)

We made several strides in fixing some of the common causes for this error in the 4.3 dec cycle. So it would be helpful to know if the issue is fixed for you.

The device lost error is very elusive and has thousands of possible causes, so I cannot say we fixed this altogether, but I am hopeful that for most people this error will become extremely rare or non existent.

@egerke28
Copy link

egerke28 commented Apr 14, 2024

Anyone else having this issue: do try to disable any GPU tweak/overlay software you have running, ASUS GPU TWEAK III was causing the issues in my case as said in the issue I linked below

@clayjohn
#87884
I am still getting the crashes as mentioned in this issue, but I am no longer seeing any VK errors even with --verbose. In fact directly before the crash I don't see any errors.

However when I'm in the project manager and not the actual editor I am seeing a spam of GL errors copied into the text file below. These errors (nor the crash) don't happen if I turn off ASUS GPU TWEAK III as mentioned in the original issue.
GL errors.txt

@jordanmichaelrushing
Copy link

I upgraded to 4.3 Dev 5 and I am not seeing it anymore. However, a big caveat is that Jolt is not building in this version of Godot. So now I'm wondering if this was fixed in 4.3 or if there's an underlying issue with Jolt. Sorry I forgot to mention I was using Jolt in my previous comment.

@clayjohn
Copy link
Member Author

I upgraded to 4.3 Dev 5 and I am not seeing it anymore. However, a big caveat is that Jolt is not building in this version of Godot. So now I'm wondering if this was fixed in 4.3 or if there's an underlying issue with Jolt. Sorry I forgot to mention I was using Jolt in my previous comment.

Your version of Jolt needs to match the version of the engine that you are using. Currently godot-jolt says it only supports Godot 4.2. So you will need to wait until godot-jolt is updated before using it with 4.3 https://github.com/godot-jolt/godot-jolt?tab=readme-ov-file#what-versions-of-godot-are-supported

@jordanmichaelrushing
Copy link

No I understand. I was just mentioning that while it seems fixed, I'm not sure if it's just because Jolt isn't available at this point for 4.3.
That being said, I changed my main 4.2 app to GodotPhysics and it's still broken. So it seems like something was fixed in 4.3 (at least for my issue)!

@mevelyns
Copy link

I got this issue today after turning on shadows for OmniLight3D for a bunch of torches I have on the walls. I changed to gl_compatible before Godot crashed after looking into a potential fix and got a new error code (drivers/gles3/storage/light_storage.cpp:1067 - condition "!sli" is true). I tried 4.2.2 and 4.3 dev 5 all still crashed with shadows enabled.

@Calinou
Copy link
Member

Calinou commented Apr 18, 2024

I changed to gl_compatible before Godot crashed after looking into a potential fix and got a new error code (drivers/gles3/storage/light_storage.cpp:1067 - condition "!sli" is true).

This is a known issue: #84747

It's fixed in the upcoming 4.3.dev6.

@speakk
Copy link

speakk commented May 3, 2024

I also got this problem when I turned on shadows for a bunch of OmniLight3D's. This with 4.3dev6.

@SimantoR
Copy link

SimantoR commented May 3, 2024

I upgraded to 4.3 Dev 5 and I am not seeing it anymore. However, a big caveat is that Jolt is not building in this version of Godot. So now I'm wondering if this was fixed in 4.3 or if there's an underlying issue with Jolt. Sorry I forgot to mention I was using Jolt in my previous comment.

This shouldn't be as I just got Jolt, but I had the issue since I downloaded 4.2

@clayjohn
Copy link
Member Author

clayjohn commented May 3, 2024

I also got this problem when I turned on shadows for a bunch of OmniLight3D's. This with 4.3dev6.

@speakk I think you may actually be running into #89312 Which is a similar issue

@speakk
Copy link

speakk commented May 3, 2024

I also got this problem when I turned on shadows for a bunch of OmniLight3D's. This with 4.3dev6.

@speakk I think you may actually be running into #89312 Which is a similar issue

Ah you're right, that is the issue I hit, thanks.

@TheFlugeler
Copy link

TheFlugeler commented May 7, 2024

I'm using godot for the first time and every time I boot it up and try to start using it, this error comes up. Ive run it in the command line and it spits out this error

Haven't even been able to do anything in godot yet because when I try to click anything it just crashes

image

Edit: I made a new project using compatibility in stead of Forward+ and it seems to work now

@FeralPug
Copy link

FeralPug commented May 9, 2024

If this helps,

Turning Single Window Mode on, seemed to have resolved the issue. I haven't had it crash at all for over 8 hours now.

To turn it on: Editor Settings -> Interface -> Editor -> Single Window Mode. If this works for others, the bug can be narrowed down by a lot.

I have been having it crash every time I open the advanced import settings window. Changing the editor to single window mode seems to be fixing the problem. Had the problem in 4.2.1 and 4.2.2 c# version, windows 11

@codeph0enix
Copy link

I have also been getting the same:

at: _editor_init (modules/gltf/register_types.cpp:63)
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: (drivers/vulkan/vulkan_context.cpp:2536)

For me it is very replicate-able/consistent, specifically on my Surface Pro and happens anytime I resize the Godot UI elements (i.e. everytime I resize the TileSets pane Godot crashes). Single Window Mode did not fix for me BUT changing to Compatibility mode immediately fixed the issue. Have not been able to get it to crash since, but changing back to Forward+ immediately brings back the issue.

Hope that helps anyone else still having this issue for now. Let me know if any further info from someone who can consistently replicate it is helpful at this point.

@SbNanduri
Copy link

SbNanduri commented May 14, 2024

I started having the same issue while I was in the middle of making a fragment shader. This happens every time I use this shader after about 5-10 seconds.

I am using Godot v4.2.2 stable, running on Windows with an RTX 3070, Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 16.0 GB RAM

Update: I just tried the same thing in v4.3-dev5 and v4.3-dev6 and I am running into the exact same issue. So it wasn't fixed for me

To replicate this, make a MeshInstance3D with a quad mesh and attach this shader to it. If the mesh is visible, Godot should crash in a few seconds.

Note: I had to convert the shader into a txt file to be able to attach it here. Convert it back to a gdshader to use it
Crashing Godot Shader.txt

@clayjohn
Copy link
Member Author

@SbNanduri your case is a bit different. You have an infinite loop in your shader which is causing your GPU to crash. When UV.y is 1.0 your margin is 0 resulting in an infinite loop. Modern GPUs respond to infinite loops by crashing the GPU driver instead of freezing your computer and burning out the GPU.

@SbNanduri
Copy link

@clayjohn Oh my bad for missing that, and thanks so much! There aren't too many mentions of this error, and I hadn't seen any mentions of infinite loops in them, so I assumed it probably wasn't trivial

@KoltPenny
Copy link

KoltPenny commented Jun 22, 2024

And I thought this was an issue specific to either Linux, or Gnome, or using the proprietary drivers for Nvidia. Good to know this is still an issue.

I can confirm this is an issue in the following specs:

  • Godot 4.2.2-stable.
  • Fedora Linux 40 x86_64.
  • Gnome 46.2 on both Wayland and Xorg
  • 11th Gen Intel Core i5-11260H @ 12x 4.4GHz
  • NVIDIA GeForce RTX 3050 Mobile.

@clayjohn
Copy link
Member Author

And I thought this was an issue specific to either Linux, or Gnome, or using the proprietary drivers for Nvidia. Good to know this is still an issue.

I can confirm this is an issue in the following specs:

  • Fedora Linux 40 x86_64.
  • Gnome 46.2 on both Wayland and Xorg
  • 11th Gen Intel Core i5-11260H @ 12x 4.4GHz
  • NVIDIA GeForce RTX 3050 Mobile.

What version of Godot?

@KoltPenny
Copy link

And I thought this was an issue specific to either Linux, or Gnome, or using the proprietary drivers for Nvidia. Good to know this is still an issue.
I can confirm this is an issue in the following specs:

  • Fedora Linux 40 x86_64.
  • Gnome 46.2 on both Wayland and Xorg
  • 11th Gen Intel Core i5-11260H @ 12x 4.4GHz
  • NVIDIA GeForce RTX 3050 Mobile.

What version of Godot?

4.2.2-stable. I edited my comment, sorry.

@clayjohn
Copy link
Member Author

@KoltPenny do you mind testing with 4.3 beta 2 (make a backup of your project first). We fixed a number of bugs that could possibly cause this error

You can download it here https://godotengine.org/download/archive/4.3-beta2/

@KoltPenny
Copy link

@clayjohn At least the error is different 😅 . Still crashes and dies on Vulkan. Going to fallback to OpenGL for now.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests