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

Godot Editor randomly hangs, giving error Condition "err != VK_SUCCESS" is true. Returning: FAILED' in the console #98465

Open
elmarhoppieland opened this issue Oct 23, 2024 · 11 comments

Comments

@elmarhoppieland
Copy link

Tested versions

v4.3.stable.official [77dcf97]

System information

Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics (Intel Corporation; 27.20.100.9415) - Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 Threads)

Issue description

Recently, the engine started randomly freezing, forcing me to close and restart the editor. I have not gotten any crashes like this before the 4.3 update. After downgrading to 4.2.2 again the engine seems to be fine. Whenever the engine crashes, I get the following error message on the console:

ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2266)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2266)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2266)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2266)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2266)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2266)

(The message is always shown exactly 6 times)

The freeze seems to happen randomly but always when I'm doing something (clicking on a button, moving the scene view, simply loading the project, ...). Sometimes the engine crashes immediately or within just a few minutes but sometimes it takes a bit longer.

Steps to reproduce

As described above, the crash/freeze seems to occur randomly and I have not found any pattern besides the fact that it only seems to occur when I do something.

Minimal reproduction project (MRP)

N/A

@elmarhoppieland
Copy link
Author

I just created a new project after downgrading to 4.2.2 and after clicking on Project (in the top toolbar) my laptop bluescreened so either there is something else going on or the fact that I still had 4.3 running in the background (when it was not responding) was a bigger problem than I thought.

By the way, my graphics driver should be updated so that isn't causing the problem.

@AtlaStar
Copy link
Contributor

The three potential error codes that can be returned at that line are the following

  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

  • VK_ERROR_DEVICE_LOST

Based on the integrated graphics and the driver version (27.20.100.9415 came out in 2021) I am gonna bet that the issue is your system. Also, just because I like to be thorough, it looks like you probably do have a graphics driver update
https://www.intel.com/content/www/us/en/products/sku/196603/intel-core-i51035g1-processor-6m-cache-up-to-3-60-ghz/downloads.html

@AtlaStar
Copy link
Contributor

AtlaStar commented Oct 23, 2024

For reference though, if it isn't a system issue on your end, it appears that your issue could then instead be related to this

#71929

@elmarhoppieland
Copy link
Author

it looks like you probably do have a graphics driver update

I downloaded the driver update through the link you sent and Godot is still crashing. Also, it seems like I'm still on driver version 27.20.100.9415, but Intel says I'm on the most recent version so I don't think I can update my drivers at all.

I am gonna bet that the issue is your system

Quite possible, but I'm not getting this issue on 4.2.2 so something definitely changed on 4.3.

@MwilliamsK
Copy link

MwilliamsK commented Nov 4, 2024

Same problem (I think) on 4.3 stable. My entire PC locks up, then my screen goes black for a few seconds, comes back and everything except Godot is fine. Godot will be frozen, and while I cannot see an error the log has the following:

USER ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2266)

I also did not have this problem on 4.2 which I used extensively, while on 4.3 it's occurring multiple times per day.
@elmarhoppieland For me this has only happened so far when running a project, not when only the editor is open. Is that the same for you?

I am using an AMD 5700XT. I will update the drivers now (few months old) and edit this post to clarify if I'm still getting it.

EDIT: Still happens. Seems to be happening less but not been keeping notes.

@TokisanGames
Copy link
Contributor

I'm getting this frequently since upgrading to 4.3-stable on an NVidia 3070 RTX, driver v565.90 10/1/24, Win11/64. 3-4 hangs just today.

There's an additional code location. It loops continuously through these error messages, while Godot is hung. The only thing that can be done is killing the process.

ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: fence_wait (drivers/vulkan/rendering_device_driver_vulkan.cpp:2066)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2266)

I often have Terrain3D running, and we consume a lot of vram and do things with the rendering server few are doing, but nothing outside of designed usage. Lots of texture array usage, which historically is a bug prone area of Godot (eg D3D12 TAs don't create mipmaps).

The three potential error codes that can be returned at that line are the following
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST

Windows Task Manager reports that used dedicated VRAM is 3.1gb / 8gb. I didn't check but I have 24gb of ram and not enough applications running to fill it. I'm 100% sure neither my system nor video card were out of memory. However device lost is generic enough that it could have occurred from any number of reasons.

@MwilliamsK
Copy link

Looks like a significant number of users from 'Road To Vostok' (Godot engine game) are having the same issue.

Developer on this thread says:

Unfortunately I am at my limits here trying to understand this issue
Here are some options out of despair:

I am also getting the same error on Vostok which uses 4.3

@clayjohn
Copy link
Member

Hi folks, to add to this. The error is a common Vulkan error and can happen for any number of reasons, but most commonly it happens due to either:

  1. Improper Vulkan API usage
  2. Submitting too much work to the GPU (or stressing it by storing too much in VRAM)
  3. A driver bug.

You can get more information by compiling a debug build with latest master. Thanks to
#98883, more debug info will be printed in this case.

You can also try running your test scene with validation layers enabled. How to do so is described here https://docs.godotengine.org/en/stable/contributing/development/debugging/vulkan/vulkan_validation_layers.html

Finally, the most helpful thing would be to prepare an MRP and share it hear so that developers can test it out and further debug. Due to the nature of these errors, we really can't do anything without more information.

@elmarhoppieland
Copy link
Author

I haven't been experiencing this issue for some time (I don't know why since I didn't change anything), but it just happened again.

@MwilliamsK: For me this has only happened so far when running a project

I am experiencing the issue without a running project. I am however running code within the editor, so it may still be the same issue.

@TokisanGames: It loops continuously through these error messages, while Godot is hung.

I only get about 4-8 messages, and I do not get your first error (at fence_wait). I only get the second one (at command_queue_execute_and_present). This makes your issue slightly different but you also have a different GPU so it may actually be the same(?).

@clayjohn: You can get more information by compiling a debug build with latest master.

I tried this, but I am not seeing any other information in the console (besides many other errors that seem unrelated even though they don't show up in 4.3 (they also show up before the editor crashes)). Could you explain how I would get more information?

the most helpful thing would be to prepare an MRP and share it here so that developers can test it out and further debug.

The thing about this is that it appears to occur on any project, even an empty one, so I can't really make an MRP. Though I haven't tested it on an empty project since that would involve restarting Godot over and over again until I get 'lucky'. Though if I can get it to happen more frequently I'll try it on a small project without tool scripts.

One more thing I just noticed: I was running 2 instances of the editor, both on different projects. After one crashed, I spent some time to write this comment, but by the time I finished, the other instance also crashed, and I didn't even at any point open that instance. So the issue seems to also occur even when I don't do anything.

@adamscott adamscott changed the title Godot Editor randomly hangs, giving error 'Condition "err != VK_SUCCESS" is true. Returning: FAILED' in the console' Godot Editor randomly hangs, giving error Condition "err != VK_SUCCESS" is true. Returning: FAILED' in the console Nov 30, 2024
@MwilliamsK
Copy link

I installed the Vulkan SDK in order to test with validation layers and suddenly the problem doesn't come up for 4 days. I uninstall the SDK and get it twice in an hour. Followed by nothing for several days. It's proving difficult to even provide help for the problem.

@Ectophasm
Copy link

Ectophasm commented Dec 20, 2024

Don't have anything to add other than that I experienced MwilliamsK's issue too a few day ago. Thought it was my system until I tried 4.2 and couldn't repeat the crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants