GNOME Bugzilla – Bug 775986
gnome-shell crashes when exiting weston-flower from menu
Last modified: 2017-01-02 13:33:54 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1403556 How to reproduce: 1. Build weston-flower 2. Run it 3. Right click on weston-flower and select exit SIGABRT #4 meta_window_unmanage at core/window.c:1389 #5 meta_wayland_surface_destroy_window at wayland/meta-wayland-surface.c:408 #6 xdg_toplevel_destructor at wayland/meta-wayland-xdg-shell.c:165 #7 destroy_resource at src/wayland-server.c:611 #8 wl_resource_destroy at src/wayland-server.c:626 #9 meta_wayland_xdg_surface_shell_client_destroyed at wayland/meta-wayland-xdg-shell.c:1429 #10 xdg_shell_destructor at wayland/meta-wayland-xdg-shell.c:1877 #11 destroy_resource at src/wayland-server.c:611 #12 for_each_helper at src/wayland-util.c:373 #13 wl_map_for_each at src/wayland-util.c:386
mutter:ERROR:core/window.c:1389:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
Created attachment 341841 [details] [review] wayland: Ensure we don't focus xdg_popups iff they're non-grabbing Commit 4295fdb892d4474b68e98aa783b725f99c1a2d3a made us skip focusing all xdg_popups instead of just non-grabbing ones as intended. This means that when unmanaging a window we might select a xdg_popup window to focus (in meta_stack_get_default_focus_window() ) but then since we don't actually focus it we go on unmanaging the focused window which triggers an assertion, as it should. To avoid this and still fixing bug 771694 we can make use of the MetaWindow->input property for non-grabbing xdg_popup windows since their semantics, in this regard, are the same as no input X11 windows. This way, when unmanaging a focused window while a xdg_popup is up, we'll either give focus to the xdg_popup or not select the popup at all to be focused if it's non-grabbing.
Olivier, can you take a loot at this and let me know if the issue in bug 771694 remains fixed?
I can reliably crash mutter with an assert() failed using the "Details" button in test-completion: 1. Run gtksourceview test-completion WAYLAND_DISPLAY=wayland-1 jhbuild run ~/.cache/jhbuild/build/gtksourceview/tests/test-completion 2. Start typing a few characters until the completion widget appears 3. Navigate to some item in the list, and click on "Details", the detail window appears 4. Click again on Details to hide the detail popup => mutter will die with an assert() failed: mutter/src/wayland/meta-wayland-surface.c:1183:update_surface_output_state: assertion failed: (surface->role)
+ Trace 236972
(In reply to Olivier Fourdan from comment #4) > I can reliably crash mutter with an assert() failed using the "Details" > button in test-completion: Right, I reverted the patch and it crashes the same , so it's a different issue unrelated to your patch.
(In reply to Olivier Fourdan from comment #4) > I can reliably crash mutter with an assert() failed using the "Details" > button in test-completion: > > 1. Run gtksourceview test-completion > > WAYLAND_DISPLAY=wayland-1 jhbuild run > ~/.cache/jhbuild/build/gtksourceview/tests/test-completion > > 2. Start typing a few characters until the completion widget appears > 3. Navigate to some item in the list, and click on "Details", the detail > window appears > 4. Click again on Details to hide the detail popup > > => mutter will die with an assert() failed: > > mutter/src/wayland/meta-wayland-surface.c:1183:update_surface_output_state: > assertion failed: (surface->role) This seems unrelated. Looks like we should disconnect the MetaSurfaceActor::mapped" signal earlier in destruct so that we don't try to deal with being unmapped on destruction.
Review of attachment 341841 [details] [review]: I think the (moved) comment is unnecessary, and documenting it in the commit message I think is enough. Either way, yes, I think we at least for now leave non-grabbing popup not take input (execept pointer/touch input), so looks good to me.
Filed bug 776036 as a follow-up for the failure in comment 4 As for attachment 341841 [details] [review], afaict it works, doesn't cause a regression wrt bug 771694
Attachment 341841 [details] pushed as c98d544 - wayland: Ensure we don't focus xdg_popups iff they're non-grabbing
Will this patch also fix https://bugzilla.redhat.com/show_bug.cgi?id=1406149 ?
(In reply to Christian Stadelmann from comment #10) > Will this patch also fix https://bugzilla.redhat.com/show_bug.cgi?id=1406149 > ? I doubt it, the stack in the downstream Red Hat bug 1406149 points toward X11 more than Wayland, to be sure I would need to reproduce but unfortunately I cannot because the search dialog in eclipse is modal.