-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Resizing causes a crash on latest stable Nvidia driver 550 #12199
Comments
Can you reproduce this upstream on |
They mention testing a
It might be reproducible on |
Yep I tested |
I tested older versions of bevy and it looks like 0.9 is the latest version that works |
Bisected the issue to the introduction of pipelined rendering 2027af4 :) |
FYI @james7132 @hymm. Thanks a ton for bisecting! |
Also works on main if I disable the |
I just ran into this myself. Arch linux with nvidia drivers |
I have the same issue on the newest nvidia drivers and X11 |
after disabling multithreading i'm getting the following error:
|
I'm also suffering from this issue:
|
I did some more investigation and found that we call |
Excellent digging. I'd be happy to review a PR that changes this behavior in Bevy: it sounds like we're doing work overly eagerly for no real benefit. |
I'm not actually sure if our code is too eager. It's just that with this specific driver |
I get this error when running with validation layers. Though all vk calls return success. |
|
I guess what I should have said is that we call both |
@eero-lehtinen could you try with this branch? https://github.com/mockersf/bevy/tree/nvidia-outdated I'm not sure how that will behave, it may fix the issue or make it worse 😄 |
Looks like that just works :D. I think I also at some point tried just blindly Though was that previous retrying behaviour needed on other platforms? |
I ported the fix to my game and there are definitely still situations where it can crash. E.g. switching between fullscreen and windowed quickly at startup and resizing the window when it is one of the two windows tiled side by side. The error is the same. |
It seems to break when there are resizes in consecutive frames, as the outdated error is ignored only in the code path where there is no resize. I made a version where the outdated error is always ignored, and that seems to work perfectly. https://github.com/eero-lehtinen/bevy/tree/v0.13.0-nvidia-fix |
Under arch linux, using nvidia driver version 550.54.14-4, with Xwayland. Testing winit 0.29.14 examples, no issues. Testing with wgpu 0.19.3 boids example, issue was reproducible.
|
Tried out your fix, works for me too in XWayland, nvidia drivers v550.54.14 |
This appears to work for me too. Arch Linux 6.7.9-arch1-1, i3, X11, Nvidia 550.54.14. |
# Objective Fix crashing on Linux with latest stable Nvidia 550 driver when resizing. The crash happens at startup with some setups. Fixes #12199 I think this would be nice to get into 0.13.1 ## Solution Ignore `wgpu::SurfaceError::Outdated` always on this platform+driver. It looks like Nvidia considered the previous behaviour of not returning this error a bug: "Fixed a bug where vkAcquireNextImageKHR() was not returning VK_ERROR_OUT_OF_DATE_KHR when it should with WSI X11 swapchains" (https://www.nvidia.com/Download/driverResults.aspx/218826/en-us/) What I gather from this is that the surface was outdated on previous drivers too, but they just didn't report it as an error. So behaviour shouldn't change. In the issue conversation we experimented with calling `continue` when this error happens, but I found that it results in some small issues like bevy_egui scale not updating with the window sometimes. Just doing nothing seems to work better. ## Changelog - Fixed crashing on Linux with Nvidia 550 driver when resizing the window ## Migration Guide --------- Co-authored-by: James Liu <[email protected]>
# Objective Fix crashing on Linux with latest stable Nvidia 550 driver when resizing. The crash happens at startup with some setups. Fixes #12199 I think this would be nice to get into 0.13.1 ## Solution Ignore `wgpu::SurfaceError::Outdated` always on this platform+driver. It looks like Nvidia considered the previous behaviour of not returning this error a bug: "Fixed a bug where vkAcquireNextImageKHR() was not returning VK_ERROR_OUT_OF_DATE_KHR when it should with WSI X11 swapchains" (https://www.nvidia.com/Download/driverResults.aspx/218826/en-us/) What I gather from this is that the surface was outdated on previous drivers too, but they just didn't report it as an error. So behaviour shouldn't change. In the issue conversation we experimented with calling `continue` when this error happens, but I found that it results in some small issues like bevy_egui scale not updating with the window sometimes. Just doing nothing seems to work better. ## Changelog - Fixed crashing on Linux with Nvidia 550 driver when resizing the window ## Migration Guide --------- Co-authored-by: James Liu <[email protected]>
# Objective Fix crashing on Linux with latest stable Nvidia 550 driver when resizing. The crash happens at startup with some setups. Fixes #12199 I think this would be nice to get into 0.13.1 ## Solution Ignore `wgpu::SurfaceError::Outdated` always on this platform+driver. It looks like Nvidia considered the previous behaviour of not returning this error a bug: "Fixed a bug where vkAcquireNextImageKHR() was not returning VK_ERROR_OUT_OF_DATE_KHR when it should with WSI X11 swapchains" (https://www.nvidia.com/Download/driverResults.aspx/218826/en-us/) What I gather from this is that the surface was outdated on previous drivers too, but they just didn't report it as an error. So behaviour shouldn't change. In the issue conversation we experimented with calling `continue` when this error happens, but I found that it results in some small issues like bevy_egui scale not updating with the window sometimes. Just doing nothing seems to work better. ## Changelog - Fixed crashing on Linux with Nvidia 550 driver when resizing the window ## Migration Guide --------- Co-authored-by: James Liu <[email protected]>
Bevy version
Affects both 0.13 and main (21adeb6)
Relevant system information
What you did
Run
cargo run --example window_resizing
or pretty much any example. Then drag a window corner to resize.What went wrong
Outputs this and crashes.
Additional information
550 was very recently stabilized (https://www.phoronix.com/news/NVIDIA-550.54.14-Linux-Driver).
Everything starts working again if I downgrade to the 545 driver.
I tested an example from the winit repository
cargo run --example window
and there was no issues.Other applications I use aren't affected by this issue, so it might not be Nvidia's fault.
Complete log of the bevy example with backtrace:
The text was updated successfully, but these errors were encountered: