swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.63k stars 1.11k forks source link

Sway crashes when scrolling mouse wheel on a floating window title bar (layout=tabbed) #5782

Open pcpthm opened 4 years ago

pcpthm commented 4 years ago

It is fully reproducible. Run sway -c ./config where config is

workspace_layout tabbed
for_window [app_id="Alacritty"] floating enable
exec alacritty

then scroll mouse wheel on the title bar.

active is NULL here: https://github.com/swaywm/sway/blob/c523aa623bc5e5b5897c0f337058aa7308871fef/sway/input/seatop_default.c#L696-L700

Stack Trace ``` (gdb) bt full #0 0x000000000043a6b4 in handle_pointer_axis (seat=0x2945ec0, event=0x7ffd25693020) at ../sway/input/seatop_default.c:699 tabcontainer = 0x293d650 active = 0x0 new_sibling = new_focus = siblings = 0x298f110 desired = new_sibling_con = layout = L_TABBED input_device = 0x2992eb0 ic = 0x0 cursor = 0x29464e0 e = 0x2946b80 surface = 0x0 sx = 2.138295562070048e-316 sy = 2.2762070701875902e-316 node = 0x2befca0 cont = 0x2befca0 edge = WLR_EDGE_NONE on_border = false on_titlebar = true on_titlebar_border = false on_contents = false on_workspace = false scroll_factor = 1 handled = false keyboard = 0x229adb0 modifiers = 0 device = 0x2994740 dev_id = 0x2b61c90 "0:0:wayland" button = 769 binding = 0x0 #1 0x000000000043831f in seatop_pointer_axis (seat=0x2945ec0, event=event@entry=0x7ffd25693020) at ../sway/input/seat.c:1509 No locals. #2 0x000000000042dcf8 in dispatch_cursor_axis (cursor=cursor@entry=0x29464e0, event=event@entry=0x7ffd25693020) at ../sway/input/cursor.c:430 No locals. #3 0x000000000042dd4a in handle_pointer_axis (listener=0x2946658, data=0x7ffd25693020) at ../sway/input/cursor.c:437 cursor = 0x29464e0 event = 0x7ffd25693020 #4 0x00007f44c480241c in wlr_signal_emit_safe () from /nix/store/f3nssqbd3z2jhkv9vir8wzq4hbw6x7cb-wlroots-master/lib/libwlroots.so.6 No symbol table info available. #5 0x00007f44c480241c in wlr_signal_emit_safe () from /nix/store/f3nssqbd3z2jhkv9vir8wzq4hbw6x7cb-wlroots-master/lib/libwlroots.so.6 No symbol table info available. #6 0x00007f44c47d1cc7 in pointer_handle_axis () from /nix/store/f3nssqbd3z2jhkv9vir8wzq4hbw6x7cb-wlroots-master/lib/libwlroots.so.6 No symbol table info available. #7 0x00007f44c3e5eabd in ffi_call_unix64 () from /nix/store/s0mblhs5vmjza9dmipn74rwqflxy1fw7-libffi-3.3/lib/libffi.so.7 No symbol table info available. #8 0x00007f44c3e5d79c in ffi_call_int () from /nix/store/s0mblhs5vmjza9dmipn74rwqflxy1fw7-libffi-3.3/lib/libffi.so.7 No symbol table info available. #9 0x00007f44c3d941b0 in wl_closure_invoke () from /nix/store/y2l7rx1dc0bsfsk5jjh3jxjir0cqzk0f-wayland-1.18.0/lib/libwayland-client.so.0 No symbol table info available. #10 0x00007f44c3d90ad8 in dispatch_event.isra () from /nix/store/y2l7rx1dc0bsfsk5jjh3jxjir0cqzk0f-wayland-1.18.0/lib/libwayland-client.so.0 No symbol table info available. #11 0x00007f44c3d9208c in wl_display_dispatch_queue_pending () from /nix/store/y2l7rx1dc0bsfsk5jjh3jxjir0cqzk0f-wayland-1.18.0/lib/libwayland-client.so.0 No symbol table info available. #12 0x00007f44c47cfd64 in dispatch_events () from /nix/store/f3nssqbd3z2jhkv9vir8wzq4hbw6x7cb-wlroots-master/lib/libwlroots.so.6 No symbol table info available. #13 0x00007f44c484f402 in wl_event_loop_dispatch () from /nix/store/y2l7rx1dc0bsfsk5jjh3jxjir0cqzk0f-wayland-1.18.0/lib/libwayland-server.so.0 No symbol table info available. #14 0x00007f44c484d9e5 in wl_display_run () from /nix/store/y2l7rx1dc0bsfsk5jjh3jxjir0cqzk0f-wayland-1.18.0/lib/libwayland-server.so.0 No symbol table info available. #15 0x000000000041ec74 in server_run (server=server@entry=0x496060 ) at ../sway/server.c:244 No locals. #16 0x000000000041e151 in main (argc=3, argv=0x7ffd25693788) at ../sway/main.c:412 verbose = 0 debug = 0 validate = 0 allow_unsupported_gpu = 0 long_options = {{name = 0x478108 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x47810d "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x478114 "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x47811d "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x478123 "version", has_arg = 0, flag = 0x0, val = 118}, { name = 0x47812b "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x478133 "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x478142 "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x478152 "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}} config_path = 0x228fa90 "./config" usage = 0x477c18 "Usage: sway [options] [command]\n\n -h, --help", ' ' , "Show help message and quit.\n -c, --config Specify a config file.\n -C, --validate Check the validity of the config file, th"... c = -1 ```
Xyene commented 4 years ago

~Regressed in https://github.com/swaywm/sway/commit/c523aa623bc5e5b5897c0f337058aa7308871fef, will send a patch soon-ish.~ Actually, this was broken before (and you mentioned it happened 1.5 as well, I just didn't notice).

fgclue commented 8 months ago

Was this patched? I can't replicate.