Got this random crash when exiting volare, haven't had time to track it down but wanted to document it here.
Core was generated by `/home/edmonds/bin/volare'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005564d6af8cbd in seat_node_from_node (seat=seat@entry=0x5564d7c1c5b0, node=node@entry=0x0) at ../sway/input/seat.c:350
350 if (node->type == N_ROOT || node->type == N_OUTPUT) {
[Current thread is 1 (Thread 0x7fe011c0aa80 (LWP 1523))]
(gdb) bt
#0 0x00005564d6af8cbd in seat_node_from_node (seat=seat@entry=0x5564d7c1c5b0, node=node@entry=0x0) at ../sway/input/seat.c:350
#1 0x00005564d6afda28 in seat_set_raw_focus (seat=0x5564d7c1c5b0, node=0x0) at ../sway/input/seat.c:1157
#2 0x00005564d6b2c2d8 in container_reap_empty (con=0x5564d831c310) at ../sway/tree/container.c:221
#3 0x00005564d6b32840 in container_reap_empty (con=0x5564d831c310) at ../sway/tree/view.c:906
#4 view_unmap (view=0x5564d831cee0) at ../sway/tree/view.c:896
#5 0x00005564d6af88ec in handle_unmap (listener=0x5564d831d108, data=<optimized out>) at ../sway/desktop/xdg_shell.c:404
#6 0x00007fe012bc6acc in wl_signal_emit_mutable () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#7 0x00007fe012b29542 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#8 0x00007fe012b29915 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#9 0x00007fe012b29931 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#10 0x00007fe012b2d5f0 in wlr_surface_destroy_role_object () at /lib/x86_64-linux-gnu/libwlroots.so.11
#11 0x00007fe012b2d691 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#12 0x00007fe012bc4ee7 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#13 0x00007fe012bcb720 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#14 0x00007fe012bcbcd3 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#15 0x00007fe012bc59d0 in wl_client_destroy () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#16 0x00007fe012bc6536 in wl_display_destroy_clients () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#17 0x00005564d6ae309f in server_fini (server=<optimized out>) at ../sway/server.c:268
#18 main (argc=<optimized out>, argv=0x7fff44ccfed8) at ../sway/main.c:420
Stack seems to be missing the call to container_add_placeholder_child(), maybe due to optimization.
I'm not immediately seeing how seat_set_raw_focus() would get called with a NULL node parameter, but I guess a if (node == NULL) { return; } at the top of that function would prevent the crash.
I'm also wondering if the focus variable in container_add_placeholder_child() can ever be NULL.
Got this random crash when exiting volare, haven't had time to track it down but wanted to document it here.
```
Core was generated by `/home/edmonds/bin/volare'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005564d6af8cbd in seat_node_from_node (seat=seat@entry=0x5564d7c1c5b0, node=node@entry=0x0) at ../sway/input/seat.c:350
350 if (node->type == N_ROOT || node->type == N_OUTPUT) {
[Current thread is 1 (Thread 0x7fe011c0aa80 (LWP 1523))]
(gdb) bt
#0 0x00005564d6af8cbd in seat_node_from_node (seat=seat@entry=0x5564d7c1c5b0, node=node@entry=0x0) at ../sway/input/seat.c:350
#1 0x00005564d6afda28 in seat_set_raw_focus (seat=0x5564d7c1c5b0, node=0x0) at ../sway/input/seat.c:1157
#2 0x00005564d6b2c2d8 in container_reap_empty (con=0x5564d831c310) at ../sway/tree/container.c:221
#3 0x00005564d6b32840 in container_reap_empty (con=0x5564d831c310) at ../sway/tree/view.c:906
#4 view_unmap (view=0x5564d831cee0) at ../sway/tree/view.c:896
#5 0x00005564d6af88ec in handle_unmap (listener=0x5564d831d108, data=<optimized out>) at ../sway/desktop/xdg_shell.c:404
#6 0x00007fe012bc6acc in wl_signal_emit_mutable () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#7 0x00007fe012b29542 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#8 0x00007fe012b29915 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#9 0x00007fe012b29931 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#10 0x00007fe012b2d5f0 in wlr_surface_destroy_role_object () at /lib/x86_64-linux-gnu/libwlroots.so.11
#11 0x00007fe012b2d691 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#12 0x00007fe012bc4ee7 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#13 0x00007fe012bcb720 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#14 0x00007fe012bcbcd3 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#15 0x00007fe012bc59d0 in wl_client_destroy () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#16 0x00007fe012bc6536 in wl_display_destroy_clients () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#17 0x00005564d6ae309f in server_fini (server=<optimized out>) at ../sway/server.c:268
#18 main (argc=<optimized out>, argv=0x7fff44ccfed8) at ../sway/main.c:420
```
Stack seems to be missing the call to `container_add_placeholder_child()`, maybe due to optimization.
I'm not immediately seeing how `seat_set_raw_focus()` would get called with a NULL `node` parameter, but I guess a `if (node == NULL) { return; }` at the top of that function would prevent the crash.
I'm also wondering if the `focus` variable in `container_add_placeholder_child()` can ever be NULL.