winit crash
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
Hi :D
I am getting a crash when I try to build the example from readme:
~/source/vello 101 % RUST_BACKTRACE=1 cargo run -p with_winit
Finished dev [unoptimized + debuginfo] target(s) in 0.24s
Running `target/debug/with_winit_bin`
[2023-05-28T13:36:15Z ERROR sctk_adwaita::config] XDG Settings Portal did not return response in time: timeout: 100ms, key: color-scheme
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/prokop/source/vello/src/util.rs:58:56
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: core::option::Option<T>::unwrap
at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/option.rs:942:21
4: vello::util::RenderContext::create_surface::{{closure}}
at ./src/util.rs:58:22
5: pollster::block_on
at /home/prokop/.cargo/registry/src/github.com-1ecc6299db9ec823/pollster-0.3.0/src/lib.rs:128:15
6: with_winit::run::{{closure}}
at ./examples/with_winit/src/lib.rs:424:31
7: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_return
at /home/prokop/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.6/src/platform_impl/linux/wayland/event_loop/mod.rs:242:9
8: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run
at /home/prokop/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.6/src/platform_impl/linux/wayland/event_loop/mod.rs:223:25
9: winit::platform_impl::platform::EventLoop<T>::run
at /home/prokop/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.6/src/platform_impl/linux/mod.rs:792:56
10: winit::event_loop::EventLoop<T>::run
at /home/prokop/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.6/src/event_loop.rs:305:9
11: with_winit::run
at ./examples/with_winit/src/lib.rs:125:5
12: with_winit::main
at ./examples/with_winit/src/lib.rs:484:13
13: with_winit_bin::main
at ./examples/with_winit/src/main.rs:4:5
14: core::ops::function::FnOnce::call_once
at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: queue 0x7f4a7d1f6170 destroyed while proxies still attached:
xdg_wm_base@20 still attached
wl_output@14 still attached
wl_seat@13 still attached
xdg_activation_v1@12 still attached
wp_viewporter@11 still attached
zwp_text_input_manager_v3@10 still attached
zwp_pointer_constraints_v1@9 still attached
zwp_relative_pointer_manager_v1@8 still attached
zxdg_decoration_manager_v1@7 still attached
wl_subcompositor@6 still attached
wl_compositor@5 still attached
wl_shm@4 still attached
wl_registry@2 still attached
~/source/vello 101 %
Am I doing something wrong or is this a bug? Thanks for any help! I'm on alpine linux with wayland btw.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/util.rs at RenderContext::create_surface, where the backtrace reports the unwrap, then inspect the call from examples/with_winit/src/lib.rs around line 424. Reproduce with RUST_BACKTRACE=1 cargo run -p with_winit on Alpine Linux with Wayland and determine why the surface creation value is None. Done means the README example no longer panics in this environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100