-
Notifications
You must be signed in to change notification settings - Fork 913
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
window example crash on x11 #3646
Comments
That's x11. |
The error comes from here: https://github.com/rust-windowing/softbuffer/blob/28ebe6e7373bae59196bff5b39d047bcc0a41137/src/backends/x11.rs#L271 Uhm.... I can reproduce this?!?
Commit ea70f77 works (randomly chosen old commit). This leads to:
This updated image from 0.24.0 to 0.25.0 and softbuffer from 0.3.0 to 0.4.0. At that commit, after Another bisect in softbuffer points at:
Uhm... apparently I did this. 🙈 Seems like winit uses softbuffer with some unsupported visuals. A "fix" is: diff --git a/examples/window.rs b/examples/window.rs
index 437d90ec..b79f75ae 100644
--- a/examples/window.rs
+++ b/examples/window.rs
@@ -132,7 +132,7 @@ impl Application {
#[allow(unused_mut)]
let mut window_attributes = Window::default_attributes()
.with_title("Winit window")
- .with_transparent(true)
+ //.with_transparent(true)
.with_window_icon(Some(self.icon.clone()));
#[cfg(any(x11_platform, wayland_platform))] Dunno what a proper fix would be. Not use softbuffer? Talk them into supporting alpha channels (but I don't think they want to do that). CC @notgull |
This can lead to weird results in some cases, but it's better than crashing. Once we have a better format API we can work around this. ref rust-windowing/winit#3646 Signed-off-by: John Nunley <dev@notgull.net>
This can lead to weird results in some cases, but it's better than crashing. Once we have a better format API we can work around this. ref rust-windowing/winit#3646 Signed-off-by: John Nunley <dev@notgull.net>
This has been fixed on the softbuffer side. |
Description
I cloned master branch and executed
cargo run --release --example window
, and got crash:OS: Linux fedora 36, Imac 2012, nvidia 675mx
Debugging output
No response
Window isn't shown unless you draw
Winit version
0.29.15
The text was updated successfully, but these errors were encountered: