SWAY 1:1.8-3 (latest) --> BUG affecting cursor causes SIGSEGV

Okay, digging deeper, there seems to be a bug at line 1325 of the latest sway's cursor.c

I am able to reproduce a crash and coredump in sway any time I choose a beat subdivision timing within Bitwig-Studio. The selection process involves a mouse click to pull up the options mini-panel, and then holding the mouse button down while dragging to select the subdivision of a beat timing I desire ( triole, quintole, septole, etc...). Crash and coredump and abrupt end of login session every time.

from coredump analysis:

Core was generated by `sway'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000055862c09defb in warp_to_constraint_cursor_hint ([email protected]=0x55862d9495e0) at ../sway-1.8/sway/input/cursor.c:1325
1325 struct sway_container *con = view->container;

#0 0x000055862c09defb in warp_to_constraint_cursor_hint ([email protected]=0x55862d9495e0) at ../sway-1.8/sway/input/cursor.c:1325
#1 0x000055862c09dfc0 in handle_constraint_destroy (listener=0x55862e249358, data=0x55862e1f2f40) at ../sway-1.8/sway/input/cursor.c:1348
#2 0x00007f600769ef6e in wl_signal_emit_mutable ([email protected]=0x55862e1f3048, [email protected]=0x55862e1f2f40) at ../wayland-1.21.0/src/wayland-server.c:2179
#3 0x00007f6007615f17 in pointer_constraint_destroy (constraint=0x55862e1f2f40) at ../wlroots-0.16.1/types/wlr_pointer_constraints_v1.c:49
#4 0x00007f60076a08ba in destroy_resource (element=0x55862e1f4290, [email protected]=0x0, flags=0) at ../wayland-1.21.0/src/wayland-server.c:730
#5 0x00007f60076a26a9 in wl_resource_destroy (resource=) at ../wayland-1.21.0/src/wayland-server.c:747
#6 0x00007f6006d174f6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#7 0x00007f6006d13f5e in ffi_call_int (cif=, fn=, rvalue=, avalue=, closure=) at ../src/x86/ffi64.c:673
#8 0x00007f6006d16b73 in ffi_call ([email protected]=0x7ffca3e757c0, fn=, [email protected]=0x0, [email protected]=0x7ffca3e75890) at ../src/x86/ffi64.c:710
#9 0x00007f600769dada in wl_closure_invoke ([email protected]=0x55862e24e500, target=, [email protected]=0x55862e1f4290, [email protected]=0, data=,
[email protected]=0x55862e11a340, flags=2) at ../wayland-1.21.0/src/connection.c:1025
#10 0x00007f60076a201c in wl_client_connection_data (fd=, mask=, data=) at ../wayland-1.21.0/src/wayland-server.c:437
#11 0x00007f60076a09e2 in wl_event_loop_dispatch (loop=0x55862cfe0bd0, [email protected]=-1) at ../wayland-1.21.0/src/event-loop.c:1027
#12 0x00007f60076a1197 in wl_display_run (display=0x55862cfe0ae0) at ../wayland-1.21.0/src/wayland-server.c:1431
#13 0x000055862c086b15 in server_run (server=) at ../sway-1.8/sway/server.c:313
#14 main (argc=, argv=0x7ffca3e75f88) at ../sway-1.8/sway/main.c:415

You might be on to something here. Your error message bears some similarities to this issue on Sway's GitHub page: warp_to_constraint_cursor_hint: Handle NULL view by Nefsen402 · Pull Request #7349 · swaywm/sway · GitHub

It looks like a fix was merged a few days ago; there's not much for it but to wait for the patch to come down in an update, unless you can figure out how to add the patch yourself.

1 Like