Crash when setting transient-for for Wayland window
While I can't reproduce it a second time, what happened was I was messing with the "different display" demo in
gtk4-demo, and gnome-shell suddenly crashed when trying to change display of a window.
I got the following backtrace.
#0 0x00007f37ade3a934 in meta_window_appears_focused (window=window@entry=0x0) at core/window.c:7152 #1 0x00007f37ade3e445 in meta_window_set_transient_for (window=0x0, parent=0x0) at core/window.c:7903 #2 0x00007f37aa66f03e in ffi_call_unix64 () at /lib64/libffi.so.6 #3 0x00007f37aa66e9ff in ffi_call () at /lib64/libffi.so.6 #4 0x00007f37a3eaaf2d in wl_closure_invoke () at /lib64/libwayland-server.so.0 #5 0x00007f37a3ea73df in wl_client_connection_data () at /lib64/libwayland-server.so.0 #6 0x00007f37a3ea8f02 in wl_event_loop_dispatch () at /lib64/libwayland-server.so.0 #7 0x00007f37ade6284b in wayland_event_source_dispatch (base=<optimized out>, callback=<optimized out>, data=<optimized out>) at wayland/meta-wayland.c:86 #8 0x00007f37af9427dd in g_main_context_dispatch () at /lib64/libglib-2.0.so.0 #9 0x00007f37af942ba8 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #10 0x00007f37af942ed2 in g_main_loop_run () at /lib64/libglib-2.0.so.0 #11 0x00007f37ade29a80 in meta_run () at core/main.c:660 #12 0x0000557e7db3e4d8 in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:525
We are probably missing some sanity checks in the set-transient calling code in
src/wayland/, and it'd be useful with a test case that reproduces it.