Open CrazieNewb opened 3 months ago
Thanks for the report -- the example works for me in Weston on Arch.
Does it work after a cargo update
? If not, could you give details on which GPU and driver you're using please?
After cargo update
to update from 2.0.0 to 2.1.0 nothing has changed.
My CPU is 11th Gen i3-1115G4
and i have no GPU. The example worked on the same laptop on windows 11 if that helps narrow it down.
I am having the same issue, and have been having it for a long time. I am on latest hyprland installed, and latest Speedy 2d version, just installed it with cargo add speedy2d
. I also checked the winit crate, and the current latest version works perfectly, but not sure where this error is comming from
I have some bad news! :smile: I think this crate needs to be updated up to lates glutin (which is rewritten from scratch) for this issue to go away. Good luck
Digression: The other side of that bad news is that glutin dropped support for iOS in that rewrite. Speedy2D doesn't support iOS yet anyway, but still...
For anyone struggling with this, you can set WINIT_UNIX_BACKEND=x11
and run the app in x11 mode, still works
Example: WINIT_UNIX_BACKEND=x11 cargo run
(Still hoping the update to new glutin is possible)
Thanks for the details everyone. I've gone ahead and rewritten Speedy2D's window handling code to use the latest version of Glutin!
https://github.com/QuantumBadger/Speedy2D/commit/3159dd1d92bd6d3771b94c7eede0295359ed6372
@JustLinuxUser / @CrazieNewb Could you try the latest version of Speedy2D from the master
branch please, to check if this resolves the issue?
speedy2d = { git = "https://github.com/QuantumBadger/Speedy2D.git" }
I am so sorry, but no, still having this issue! Here is the backtrace:
thread 'main' panicked at /home/andriy/.cargo/git/checkouts/speedy2d-f61a7bd07eee4969/ba5abfc/src/window_internal_glutin.rs:696:20:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: rust_begin_unwind
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:72:14
2: core::panicking::panic
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:145:5
3: core::option::unwrap_failed
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/option.rs:1985:5
4: core::option::Option<T>::unwrap
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/option.rs:933:21
5: speedy2d::window_internal_glutin::gl_config_picker
at /home/andriy/.cargo/git/checkouts/speedy2d-f61a7bd07eee4969/ba5abfc/src/window_internal_glutin.rs:696:5
6: core::ops::function::FnOnce::call_once
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:250:5
7: glutin_winit::DisplayBuilder::build
at /home/andriy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/glutin-winit-0.4.2/src/lib.rs:126:13
8: speedy2d::window_internal_glutin::create_best_context
at /home/andriy/.cargo/git/checkouts/speedy2d-f61a7bd07eee4969/ba5abfc/src/window_internal_glutin.rs:718:22
9: speedy2d::window_internal_glutin::WindowGlutin<UserEventType>::new
at /home/andriy/.cargo/git/checkouts/speedy2d-f61a7bd07eee4969/ba5abfc/src/window_internal_glutin.rs:386:13
10: speedy2d::Window<UserEventType>::new_with_user_events
at /home/andriy/.cargo/git/checkouts/speedy2d-f61a7bd07eee4969/ba5abfc/src/lib.rs:1433:27
11: speedy2d::Window::new_with_options
at /home/andriy/.cargo/git/checkouts/speedy2d-f61a7bd07eee4969/ba5abfc/src/lib.rs:1419:9
12: speedy2d::Window::new_centered
at /home/andriy/.cargo/git/checkouts/speedy2d-f61a7bd07eee4969/ba5abfc/src/lib.rs:1390:9
13: day17_2::main
at ./src/main.rs:240:18
14: core::ops::function::FnOnce::call_once
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
and WINIT_UNIX_BACKEND=x11 cargo run
doesn't work either now. Same error
On arch linux with hyprland and wayland. Running the helloworld example outputs:
The window opens for 1 frame and closes.