-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Wayland panic and crash #11275
Comments
Can you reproduce this on |
Yes, I can reproduce it on main. |
Great, thanks. Can you reproduce it upstream on |
Minimal reproducer: use bevy::{prelude::*, window::WindowMode};
fn main() {
App::new()
.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
mode: WindowMode::Fullscreen,
..Default::default()
}),
..Default::default()
}))
.run();
} The problem is this unwrap: https://github.com/bevyengine/bevy/blob/a6574786757c0a0a7ddffb99fdc40ce90980fc82/crates/bevy_winit/src/winit_windows.rs#L62C80-L62C80 winit's documentation states that Note: This only panics when requesting the |
Wayland doesn't have the concept of a "primary" monitor. We could try to find a fallback monitor. Maybe just the first one in the list of monitors? Maybe the one with the highest resolution/refresh rate? Not that it would matter, because requesting We could check for Wayland, and request borderless fullscreen instead. We could simply ignore the request completely. I'm not sure what to do. |
At least when changing the fullscreen mode during runtime, any exclusive fullscreen request just gets ignored (by winit). It's also worth thinking about if this behaviour is desired. |
# Objective - Get rid of unwraps in winit fullscreen handling code, which are the source of some crashes. - Fix #11275 ## Solution - Replace the unwraps with warnings. Ignore the fullscreen request, do nothing instead.
Bevy version
bevy 0.12.1
[Optional] Relevant system information
Ubuntu 23.10, all packages are up to date.
Rust: 1.75.0 (stable)
The system is running with the
on-demand
PRIME profile.What you did
Try to run my own app or any examples with the wayland feature.
What went wrong
Crash or panic
Additional information
full screen:
window mode:
(segmentation fault)
The text was updated successfully, but these errors were encountered: