-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[0.5] Bevy sometimes does not terminate cleanly #1908
Comments
Can you attach a debugger when this happens and get a backtrace for all threads? For gdb this is |
Log
|
Maybe a race condition in wgpu or gfx-rs? |
Can you open an issue at https://github.com/gfx-rs/wgpu? |
I'm not familiar enough with wgpu nor the internals of how bevy interfaces with wgpu via bevy_wgpu to file an informed bug report with the wgpu project. |
Found an issue for what seems to be the same problem: https://github.com/gfx-rs/wgpu-rs/issues/584 |
Can you comment that on gfx-rs/wgpu-rs#584? Might be useful for them. |
This seems to be a mesa bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/176. X11 doesn't like it when the swapchain is deleted after the window. |
For anyone else who comes across this thread looking for information on bevy hangups: The only thing that got the issue to go away was switching back to my discrete Nvidia GPU. Looks like there are some Intel specific issues with the vk driver. Though this PR should have fixed at least one of them. Some other relevant links: For my issue at least, the likelihood of the deadlock increased with the complexity of the scene so it is also possible that my beefier GPU is hiding the issue. Though, I just loaded enough geometry into my scene to tank the frame rate, and it still ran without locking up. I also had the deadlock when closing a window with no geometry in it, and that is gone. Hope this helps someone. |
So we ran into this issue making Warlock's Gambit (developed on linux) The workaround was to disable vsync Workaroundcode for bevy 0.6: app.insert_resource(WindowDescriptor { vsync: false, ..Default::default() })
// rest of app initialization code for bevy 0.7: app.insert_resource(WindowDescriptor { present_mode: PresentMode::Immediate, ..Default::default() })
// rest of app initialization Note that you can disable vsync specifically for linux by adding the Obviously this is far from ideal because then your game will chug your CPU and GPU as much as it can, but it's the best way to prevent hangs on exits. Which perturbed my workflow a major deal. |
Since this is a vulkan-specific bug, if you're not relying on any vulkan-specific features, you can override the wgpu backend with |
This issue seems similar to #5524, which is now fixed. I assume this is also fixed. If anyone can reproduce in bevy 0.10.0, please speak up. |
Bevy version
0.5
Operating system & version
Arch Linux
What you did
After updating to 0.5, Bevy sometimes does not terminate even after closing the window.
Using the following example:
In the video, I'm closing using Alt-F4. I have to Ctrl-C the third run of the executable. It happens often enough to be noticeable.
The text was updated successfully, but these errors were encountered: