winit: "internal error: entered unreachable code" when using Wayland backend
Attempting to create a Window on the Wayland backend on my system results in the following:
thread 'main' panicked at 'internal error: entered unreachable code', /home/slabity/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.23.0/src/platform_impl/linux/wayland/window/mod.rs:218:77
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[wayland-client error] A handler for wl_keyboard panicked.
Which seems to be coming from this:
// To make our window usable for drawing right away we must `ack` a `configure`
// from the server, the acking part here is done by SCTK window frame, so we just
// need to sync with server so it'll be done automatically for us.
event_loop_handle.with_source(&wayland_source, |event_queue| {
let event_queue = event_queue.queue();
let _ = event_queue.sync_roundtrip(&mut *winit_state, |_, _, _| unreachable!());
});
Can anyone explain what this little piece of code is doing and what would cause the it to be reachable?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- Auto merge of #28614 - yvt:chore-fix-wayland, r=jdm `shell.nix`: Add `libxkbcommon` to `LD_LIBRARY_PATH` `libxkbcommon` is a runtime dependency of winit's Wayland backend. Servo crashes with [a very... — committed to servo/servo by bors-servo 3 years ago
- Update wayland-rs to 0.30.0 This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, meani... — committed to kchibisov/winit by kchibisov a year ago
- Update wayland-rs to 0.30.0 This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, meani... — committed to kchibisov/winit by kchibisov a year ago
- Update wayland-rs to 0.30.0 This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, meani... — committed to kchibisov/winit by kchibisov a year ago
- Update wayland-rs to 0.30.0 This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, meani... — committed to kchibisov/winit by kchibisov a year ago
- Update wayland-rs to 0.30.0 This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, meani... — committed to kchibisov/winit by kchibisov a year ago
- Update wayland-rs to 0.30.0 This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, meani... — committed to kchibisov/winit by kchibisov a year ago
- Update wayland-rs to 0.30.0 This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, meani... — committed to kchibisov/winit by kchibisov a year ago
- Update wayland-rs to 0.30.0 This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, mea... — committed to rust-windowing/winit by kchibisov a year ago
- Update flake.nix To run example/gui/hello.roc in Wayland (NixOS) Error message: https://github.com/rust-windowing/winit/issues/1760 I ran it as usual with `nix-shell`, and then executed it usi... — committed to PlumpMath/roc by PlumpMath a year ago
This worked for me:
sudo apt install libxkbcommon-dev libegl1 libwayland-dev🚀The same error occured to me - maybe this issue should be re-opened to add a more helpful error message
Oh, do you have libxkbcommon installed and also on which distro are you on? IIRC you can only reach that code if we failed to open libxkbcommon or something like that.