rust-windowing / winit

Window handling library in pure Rust
https://docs.rs/winit/
Apache License 2.0
4.84k stars 904 forks source link

[wayland-client error] Attempted to dispatch unknown opcode 0 for wl_shm, aborting. #1942

Closed uzytkownik closed 3 years ago

uzytkownik commented 3 years ago

When I tried to follow amethyst example it looks like winit crashed:

[3306410.563]  -> wl_display@1.get_registry(new id wl_registry@2)
[3306410.606]  -> wl_display@1.sync(new id wl_callback@3)
[3306410.801] wl_display@1.delete_id(3)
[3306410.813] wl_registry@2.global(1, "wl_drm", 2)
[3306410.853] wl_registry@2.global(2, "wl_compositor", 4)
[3306410.861] wl_registry@2.global(3, "wl_shm", 1)
[3306410.868] wl_registry@2.global(4, "wl_output", 2)
[3306410.941]  -> wl_registry@2.bind(4, "wl_output", 2, new id [unknown]@4)
[3306410.977] wl_registry@2.global(5, "zxdg_output_manager_v1", 3)
[3306410.991] wl_registry@2.global(6, "wl_data_device_manager", 3)
[3306411.000] wl_registry@2.global(7, "zwp_primary_selection_device_manager_v1", 1)
[3306411.011] wl_registry@2.global(8, "gtk_primary_selection_device_manager", 1)
[3306411.022] wl_registry@2.global(9, "wl_subcompositor", 1)
[3306411.032] wl_registry@2.global(10, "xdg_wm_base", 3)
[3306411.043] wl_registry@2.global(11, "zxdg_shell_v6", 1)
[3306411.053] wl_registry@2.global(12, "wl_shell", 1)
[3306411.064] wl_registry@2.global(13, "gtk_shell1", 4)
[3306411.075] wl_registry@2.global(14, "wp_viewporter", 1)
[3306411.085] wl_registry@2.global(15, "zwp_pointer_gestures_v1", 1)
[3306411.096] wl_registry@2.global(16, "zwp_tablet_manager_v2", 1)
[3306411.104] wl_registry@2.global(17, "wl_seat", 5)
[3306411.167]  -> wl_registry@2.bind(17, "wl_seat", 5, new id [unknown]@5)
[3306411.208] wl_registry@2.global(18, "zwp_relative_pointer_manager_v1", 1)
[3306411.220] wl_registry@2.global(19, "zwp_pointer_constraints_v1", 1)
[3306411.230] wl_registry@2.global(20, "zxdg_exporter_v1", 1)
[3306411.241] wl_registry@2.global(21, "zxdg_importer_v1", 1)
[3306411.252] wl_registry@2.global(22, "zwp_linux_dmabuf_v1", 3)
[3306411.262] wl_registry@2.global(23, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[3306411.273] wl_registry@2.global(24, "zwp_text_input_manager_v3", 1)
[3306411.283] wl_registry@2.global(25, "gtk_text_input_manager", 1)
[3306411.292] wl_registry@2.global(26, "wp_presentation", 1)
[3306411.302] wl_callback@3.done(22605)
[3306411.309]  -> wl_display@1.sync(new id wl_callback@3)
[3306411.439] wl_display@1.delete_id(3)
[3306411.450] wl_output@4.geometry(0, 0, 340, 190, 0, "AUO", "0x42eb", 0)
[3306411.508] wl_output@4.mode(3, 3840, 2160, 60002)
[3306411.523] wl_output@4.scale(2)
[3306411.528] wl_output@4.done()
[3306411.552] wl_seat@5.capabilities(3)
[3306411.600]  -> wl_seat@5.get_pointer(new id wl_pointer@6)
[3306411.762]  -> wl_seat@5.get_keyboard(new id wl_keyboard@7)
[3306411.779] wl_seat@5.name("seat0")
[3306411.787] wl_callback@3.done(22605)
[3306411.825]  -> wl_registry@2.bind(2, "wl_compositor", 4, new id [unknown]@3)
[3306411.849]  -> wl_registry@2.bind(9, "wl_subcompositor", 1, new id [unknown]@8)
[3306411.873]  -> wl_registry@2.bind(3, "wl_shm", 1, new id [unknown]@9)
[3306411.891]  -> wl_registry@2.bind(6, "wl_data_device_manager", 3, new id [unknown]@10)
[3306411.914]  -> wl_registry@2.bind(10, "xdg_wm_base", 3, new id [unknown]@11)
[3306411.932]  -> wl_display@1.sync(new id wl_callback@12)
[3306412.202] wl_display@1.delete_id(12)
[3306412.212] wl_keyboard@7.keymap(1, fd 4, 52845)
[3306412.230] wl_keyboard@7.repeat_info(33, 500)
[3306412.238] wl_shm@9.format(0)
[3306412.281] wl_shm@9.format(1)
[3306412.286] wl_shm@9.format(909199186)
[3306412.291] wl_shm@9.format(808669761)
[3306412.296] wl_shm@9.format(808669784)
[3306412.302] wl_shm@9.format(808665665)
[3306412.307] wl_shm@9.format(808665688)
[3306412.312] wl_shm@9.format(1211388481)
[wayland-client error] Attempted to dispatch unknown opcode 0 for wl_shm, aborting.
Thread 1 "creepers" received signal SIGABRT, Aborted.
0x00007ffff7a5933a in raise () from /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libc.so.6
(gdb) bt
#0  0x00007ffff7a5933a in raise () from /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libc.so.6
#1  0x00007ffff7a43523 in abort () from /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libc.so.6
#2  0x0000555555f45a8a in wayland_client::imp::proxy::proxy_dispatcher<wayland_client::generated::c_api::wl_shm::WlShm> (_implem=0x5555565d3de5 <wayland_sys::RUST_MANAGED>, 
    proxy=0x555556aa0e50, opcode=0, _msg=0x555556a61f78 <wayland_client::generated::c_interfaces::wl_shm_events>, args=0x555556aa1478)
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.21.13/src/native_lib/proxy.rs:365
#3  0x00007ffff6112403 in wl_closure_dispatch () from /nix/store/d18pfkbyrkw7jk25zbdgwgilqyk4xpbz-wayland-1.19.0/lib/libwayland-client.so
#4  0x00007ffff610e922 in dispatch_event.isra () from /nix/store/d18pfkbyrkw7jk25zbdgwgilqyk4xpbz-wayland-1.19.0/lib/libwayland-client.so
#5  0x00007ffff611004c in wl_display_dispatch_queue_pending () from /nix/store/d18pfkbyrkw7jk25zbdgwgilqyk4xpbz-wayland-1.19.0/lib/libwayland-client.so
#6  0x00007ffff611052f in wl_display_roundtrip_queue () from /nix/store/d18pfkbyrkw7jk25zbdgwgilqyk4xpbz-wayland-1.19.0/lib/libwayland-client.so
#7  0x0000555555f94a5d in wayland_client::imp::event_queue::EventQueueInner::sync_roundtrip (self=0x555556a98010)
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.21.13/src/native_lib/event_queue.rs:77
#8  0x0000555555f85266 in wayland_client::event_queue::EventQueue::sync_roundtrip (self=0x7fffffff17c8)
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.21.13/src/event_queue.rs:95
#9  0x0000555555e4fa1c in smithay_client_toolkit::env::Environment::from_display_with_cb<closure-0> (display=0x555556a97400, evq=0x7fffffff17c8, cb=...)
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/smithay-client-toolkit-0.4.6/src/env.rs:210
#10 0x0000555555e9574c in winit::platform::platform::wayland::event_loop::EventsLoop::new ()
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/wayland/event_loop.rs:126
#11 0x0000555555ef720a in winit::platform::platform::EventsLoop::new_wayland ()
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/mod.rs:471
#12 0x0000555555ef6e98 in winit::platform::platform::EventsLoop::new () at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/mod.rs:452
#13 0x0000555555ea269b in winit::EventsLoop::new () at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/lib.rs:251
#14 0x0000555555c984bf in amethyst_window::bundle::{{impl}}::build (self=..., world=0x7fffffff4810, builder=0x7fffffff3c38)
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_window-0.15.3/src/bundle.rs:58
#15 0x000055555596d317 in amethyst_rendy::plugins::window::{{impl}}::on_build<gfx_backend_vulkan::Backend> (self=0x555556a6aa60, world=0x7fffffff4810, builder=0x7fffffff3c38)
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_rendy-0.15.3/src/plugins.rs:98
#16 0x0000555555965c7d in amethyst_rendy::bundle::{{impl}}::build<gfx_backend_vulkan::Backend> (self=..., world=0x7fffffff4810, builder=0x7fffffff3c38)
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_rendy-0.15.3/src/bundle.rs:92
#17 0x000055555579d22f in amethyst_core::deferred_dispatcher_operation::{{impl}}::exec<amethyst_rendy::bundle::RenderingBundle<gfx_backend_vulkan::Backend>> (self=0x555556a6b7b0, 
    world=0x7fffffff4810, dispatcher_builder=0x7fffffff3c38)
    at (...)/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_core-0.15.3/src/deferred_dispatcher_operation.rs:175
maroider commented 3 years ago

I see that the example you tried to run is using Winit 0.19.5. Older versions of Winit are not supported.

Amethyst's main branch has a more recent version of Winit, so you should try using that instead.

maroider commented 3 years ago

I see that you've opened an issue on Amethyts' issue tracker, and I believe you've misunderstood the situation.

  1. The latest version of Winit is 0.25.0
  2. Amethyst targets winit = 0.24.0 last I checked
  3. Winit is maintained

Anyway, I'm going to close this issue for now. Feel free to re-open it if you still encounter the same problem with the latest version of Winit.