GNOME Bugzilla – Bug 729044
Native session crashes
Last modified: 2014-04-27 18:24:38 UTC
Current master does not run as native session here: Apr 27 10:40:33 u904 gnome-session[1714]: Window manager warning: Log level 16: invalid cast from 'MetaBackendNative' to 'MetaBackendX11' Apr 27 10:40:33 u904 kernel: gnome-shell[1733]: segfault at 25 ip 00007f3ee4732ea9 sp 00007fffb5a5c9a0 error 4 in libX11.so.6.3.0[7f3ee46fa000+138000] BT: (gdb) bt
+ Trace 233527
Why do we try to cast the native backend to x11 when running on wayland?
This commit https://git.gnome.org/browse/mutter/commit/?id=8c5da24401b281f6c302d5c4e8b2dd2906ea332f seems to add the casts ... is that code supposed to run on a native session?
No. I added some if (!META_IS_BACKEND_X11 (backend)) return;s around to prevent meta_change_keygrab from being called. It seems I forgot a few.
Created attachment 275259 [details] [review] grabs: Prevent x11 code to get called when not running the x11 backend
Review of attachment 275259 [details] [review]: ::: src/core/display.c @@ +1998,3 @@ + if (!META_IS_BACKEND_X11 (backend)) + return; meta_change_button_grab is called by four functions: meta_display_grab_window_buttons, meta_display_ungrab_window_buttons, meta_display_grab_focus_window_button, meta_display_ungrab_focus_window_button. I fixed the first two callers, but forgot the other two.
Created attachment 275273 [details] [review] display: Don't call x11 backend code when running native
Attachment 275273 [details] pushed as 4e584c2 - display: Don't call x11 backend code when running native