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

Vulkan: Error spam while running project VulkanContext::swap_buffers: Condition "err" is true. Returning: ERR_CANT_CREATE #59699

Closed
Tracked by #71929
INdIEDeV016 opened this issue Mar 30, 2022 · 11 comments

Comments

@INdIEDeV016
Copy link

INdIEDeV016 commented Mar 30, 2022

Godot version

v4.0.alpha.custom_build [118f296]

System information

Windows 10, Vulkan Clustered, NVIDIA GeForce GT 1030

Issue description

This error occurs randomly while running my game. And freezes project just like other issues out there, but in my case I am not sure what causes it. No overlay software is used. It doesn't crash on startup, but while running the project. Not sure what causes it! Best guess: CPU intensive tasks such as adding many CanvasItem nodes (Node2D or Control Nodes) to SceneTree at once and it generally happens for relatively complex and big projects. So, can't make a reproduction project for now.

image

And it has been occurring for me even before alpha releases.

Steps to reproduce

Not sure. Quite random. Or mostly when some CPU intensive tasks such as adding many CanvasItem nodes (Node2D or Control Nodes) to SceneTree at once.

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Mar 30, 2022

Related to #57937 and #45725.

As per #45725 (comment), did you update your NVIDIA driver to 511.23 or newer?

@Calinou Calinou changed the title Random Error spam while running project VulkanContext::swap_buffers: Condition "err" is true. Returning: ERR_CANT_CREATE Vulkan: Error spam while running project VulkanContext::swap_buffers: Condition "err" is true. Returning: ERR_CANT_CREATE Mar 30, 2022
@INdIEDeV016
Copy link
Author

Yes it seems!
image

@AndersonDeMatos
Copy link

AndersonDeMatos commented Apr 17, 2022

this also happened to me, in two different situations. But I can't reproduce this error intentionally.
The first time it happened while I was minimizing the debug window of my running project by double clicking on border of the OS window.
The second time when I was scrolling the mouse wheel over a HSlider on the debug window of my project while it was running.
In both situations the "game" window froze and I had to stop its execution by clicking the stop button on the editor.
I'm using Pop!_OS 21.10, and my video drivers are updated.
The project I'm working on is at the moment, basically a complex GUI and some 2D polygons being drawn to the screen.

Screenshot from 2022-04-17 19-38-51

@INdIEDeV016
Copy link
Author

INdIEDeV016 commented Apr 18, 2022

@AndersonDeMatos Yes, after further testing and close observation, your problems have happened in my project. It seems, there is some unidentified Vulkan 2D rendering problem.

@JosephCatrambone
Copy link
Contributor

I seem to be running into this issue, too, on Alpha 13 with hotfix (Godot Engine v4.0.alpha13.official.82811367c). For me, it happens on nVidia graphics when coming out of system suspension.

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

Startup logs:

Godot Engine v4.0.alpha13.official.82811367c - https://godotengine.org                                                                         
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0                                      
                                                                                                                                               Vulkan API 1.2.131 - Using Vulkan Device #1: NVIDIA - NVIDIA GeForce GTX 1050 Ti with Max-Q Design

@Calinou
Copy link
Member

Calinou commented Aug 7, 2022

@JosephCatrambone Can you reproduce this with other games or applications using Vulkan? Suspend on Linux is notoriously buggy with graphics drivers, especially with the proprietary NVIDIA driver.

@codespren
Copy link

I received this same error in Godot 4 Beta 1 when I zoomed close to meshInstance ingame. The meshInstance had a shader material with many if-clauses. I changed the shader logic so that there were less ifs and the error went away.

Now I updated to Godot 4 Beta 2 and error occurs immediately when I run the project even if I disable the problematic shader. I tried to start a new, empty project and it seems to work fine.

macOs Monterey 12.6, AMD Radeon Pro 5500M

image

@darksylinc
Copy link
Contributor

Hi!

Could you test this version to see if you can still repro the problem? Thanks.

@JosephCatrambone
Copy link
Contributor

It's been a year or so and my machine's drivers have likely updated since then, but I think I can try some night this week.

@INdIEDeV016
Copy link
Author

INdIEDeV016 commented Aug 23, 2023

I don't know which commit might have resolved the issue, but there are no more random swapchain errors and crashes anymore.

This issue can be closed.

@Calinou
Copy link
Member

Calinou commented Aug 23, 2023

Closing in favor of #71929.

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

6 participants