Skip to content
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

Examples panic on Wayland #3277

Closed
eero-lehtinen opened this issue Dec 21, 2023 · 0 comments · Fixed by #3278
Closed

Examples panic on Wayland #3277

eero-lehtinen opened this issue Dec 21, 2023 · 0 comments · Fixed by #3278

Comments

@eero-lehtinen
Copy link
Contributor

After 04ca85a, examples crash for me on Wayland. I'm not sure what the reason is but they work fine before that commit. I'm using Gnome and Nvidia.

Output:

❯ RUST_BACKTRACE=1 cargo run --example custom_cursors
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/examples/custom_cursors`
wl_shm_pool@31: error 1: invalid width, height or stride (0x44, 0)
Protocol error 1 on object wl_shm_pool@31: 
thread 'main' panicked at examples/util/fill.rs:33:53:
Failed to create a softbuffer context: PlatformError(Some("Failed to make round trip to server"), Some(Backend(Protocol(ProtocolError { code: 1, object_id: 31, object_interface: "wl_shm_pool", message: "" }))))
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5
   1: core::panicking::panic_fmt
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/result.rs:1652:5
   3: core::result::Result<T,E>::expect
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/result.rs:1034:23
   4: custom_cursors::fill::fill_window::GraphicsContext::new
             at ./examples/util/fill.rs:33:26
   5: custom_cursors::fill::fill_window::{{closure}}::{{closure}}
             at ./examples/util/fill.rs:66:36
   6: core::option::Option<T>::get_or_insert_with
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/option.rs:1666:26
   7: custom_cursors::fill::fill_window::{{closure}}
             at ./examples/util/fill.rs:65:23
   8: std::thread::local::LocalKey<T>::try_with
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/thread/local.rs:270:16
   9: std::thread::local::LocalKey<T>::with
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/thread/local.rs:246:9
  10: custom_cursors::fill::fill_window
             at ./examples/util/fill.rs:55:5
  11: custom_cursors::main::{{closure}}
             at ./examples/custom_cursors.rs:79:17
  12: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:294:13
  13: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::single_iteration
             at ./src/platform_impl/linux/wayland/event_loop/mod.rs:504:17
  14: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::pump_events
             at ./src/platform_impl/linux/wayland/event_loop/mod.rs:231:13
  15: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand
             at ./src/platform_impl/linux/wayland/event_loop/mod.rs:201:19
  16: winit::platform_impl::platform::EventLoop<T>::run_on_demand
             at ./src/platform_impl/linux/mod.rs:828:56
  17: winit::platform_impl::platform::EventLoop<T>::run
             at ./src/platform_impl/linux/mod.rs:821:9
  18: winit::event_loop::EventLoop<T>::run
             at ./src/event_loop.rs:249:9
  19: custom_cursors::main
             at ./examples/custom_cursors.rs:50:5
  20: core::ops::function::FnOnce::call_once
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
kchibisov added a commit to kchibisov/winit that referenced this issue Dec 21, 2023
We must resize client side decorations frame for the initial configure,
otherwise no resize will be delivered downstream, since there's no
change in state.

Fixes rust-windowing#3277.
kchibisov added a commit to kchibisov/winit that referenced this issue Dec 21, 2023
While we correctly configure the sizes, we also need to actually resize
the frame on initial configure and send geometry.

Fixes rust-windowing#3277.
kchibisov added a commit to kchibisov/winit that referenced this issue Dec 21, 2023
While we correctly configure the sizes, we also need to actually resize
the frame on initial configure and send geometry.

Fixes rust-windowing#3277.
kchibisov added a commit that referenced this issue Dec 21, 2023
While we correctly configure the sizes, we also need to actually resize
the frame on initial configure and send geometry.

Fixes #3277.
kchibisov added a commit to kchibisov/winit that referenced this issue Dec 21, 2023
While we correctly configure the sizes, we also need to actually resize
the frame on initial configure and send geometry.

Fixes rust-windowing#3277.
kchibisov added a commit to kchibisov/winit that referenced this issue Dec 21, 2023
While we correctly configure the sizes, we also need to actually resize
the frame on initial configure and send geometry.

Fixes rust-windowing#3277.
kchibisov added a commit that referenced this issue Dec 21, 2023
While we correctly configure the sizes, we also need to actually resize
the frame on initial configure and send geometry.

Fixes #3277.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant