Segfault while playing a Xwayland game
Here is the stack trace:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f416483dcb0 in wm_debug_is_enabled (wm=<optimized out>) at ../xwayland/window-manager.c:221
221 ../xwayland/window-manager.c: No such file or directory.
[Current thread is 1 (Thread 0x7f41667e68c0 (LWP 2063))]
(gdb) bt
#0 0x00007f416483dcb0 in wm_debug_is_enabled (wm=<optimized out>) at ../xwayland/window-manager.c:221
#1 wm_printf (wm=0x562bdb775700, fmt=fmt@entry=0x7f41648490d0 "surface for xid %d destroyed\n") at ../xwayland/window-manager.c:230
#2 0x00007f416483dd7d in surface_destroy (listener=0x562bdb7de2d0, data=<optimized out>) at ../xwayland/window-manager.c:1967
#3 0x00007f4166ddeede in weston_signal_emit_mutable (data=0x562bdb7e8200, signal=0x562bdb7e8208) at ../shared/signal.c:62
#4 weston_surface_unref (surface=0x562bdb7e8200) at ../libweston/compositor.c:2170
#5 0x00007f416485358f in desktop_shell_destroy_surface (shsurf=0x562bdb775070) at ../desktop-shell/shell.c:293
#6 0x00007f4166da2a63 in wl_event_loop_dispatch_idle (loop=loop@entry=0x562bdadecc30) at ../wayland/src/event-loop.c:969
#7 0x00007f4166da2b74 in wl_event_loop_dispatch (loop=0x562bdadecc30, timeout=timeout@entry=-1) at ../wayland/src/event-loop.c:1032
#8 0x00007f4166d9fe67 in wl_display_run (display=display@entry=0x562bdadecb40) at ../wayland/src/wayland-server.c:1471
#9 0x00007f4167054c47 in wet_main (argc=<optimized out>, argv=<optimized out>, test_data=0x0) at ../compositor/main.c:4080
#10 0x00007f4166e4a790 in () at /usr/lib/libc.so.6
#11 0x00007f4166e4a84a in __libc_start_main () at /usr/lib/libc.so.6
#12 0x0000562bda80b055 in _start ()
It seems the server became NULL
somehow, according to gdb still:
(gdb) p wm->server
$3 = (struct weston_xserver *) 0x0
What is strange is that I wasn’t destroying a surface, it might have been a crash of the game or of Xwayland, although I don’t see that in coredumpctl.