Crash when trying to open Xwayland windows on non-existing workspaces
Affected version
Fedora 31, mutter 3.34.3-2, Wayland
Perhaps the bug also exists when running with Xorg, didn't bother testing.
Bug summary
When an Xwayland application is trying to open a window on a workspace that doesn't exist, mutter hits the assertion "'window->unmanaging || workspace != NULL' should be TRUE" and dies.
Steps to reproduce
- Have an empty gnome-shell (i.e., no windows)
- Start Chromium
- Make sure to have "On startup" set to "Continue where you left off" in Chromium's settings
- Open another application (e.g., a terminal) on the second workspace
- Open another window in Chromium and move it to the third workspace
- Exit Chromium (make sure to use the "Exit" button in the three-dots menu, do not just close the windows)
- Close the application on the second workspace (you should have one workspace and zero windows again now)
- Start Chromium again, Chromium will try to create the second window on the third workspace
💣
What happened
What did you expect to happen
No
Relevant logs, screenshots, screencasts etc.
Stack trace:
#0 0x00007fb64d316625 in raise () at /lib64/libc.so.6
#1 0x0000556cf8475322 in dump_gjs_stack_on_signal_handler (signo=6) at ../src/main.c:394
#2 0x00007fb64d3166b0 in <signal handler called> () at /lib64/libc.so.6
#3 0x00007fb64d316625 in raise () at /lib64/libc.so.6
#4 0x00007fb64d2ff8d9 in abort () at /lib64/libc.so.6
#5 0x00007fb64e0deb53 in g_assertion_message
(domain=domain@entry=0x7fb64d60a26f "mutter", file=file@entry=0x7fb64d614554 "../src/core/window.c", line=line@entry=4844, func=func@entry=0x7fb64d6169d0 <__func__.124437> "set_workspace_state", message=message@entry=0x7fb64d614dd8 "'window->unmanaging || workspace != NULL' should be TRUE")
at ../glib/gtestutils.c:2912
#6 0x00007fb64d57f766 in set_workspace_state
(window=window@entry=0x556cfcbc03f0 [MetaWindowXwayland], on_all_workspaces=on_all_workspaces@entry=0, workspace=0x0) at ../src/core/window.c:4844
#7 0x00007fb64d584ec8 in _meta_window_shared_new
(display=display@entry=0x556cf9d60040 [MetaDisplay], client_type=client_type@entry=META_WINDOW_CLIENT_TYPE_X11, surface=surface@entry=0x0, xwindow=xwindow@entry=16777228, existing_wm_state=existing_wm_state@entry=0, effect=effect@entry=META_COMP_EFFECT_CREATE, attrs=<optimized out>) at ../src/core/window.c:1296
#8 0x00007fb64d5a5114 in meta_window_x11_new
(display=display@entry=0x556cf9d60040 [MetaDisplay], xwindow=16777228, must_be_viewable=must_be_viewable@entry=0, effect=effect@entry=META_COMP_EFFECT_CREATE) at ../src/x11/window-x11.c:3486
#9 0x00007fb64d591411 in handle_other_xevent (x11_display=x11_display@entry=0x556cf9dbc230 [MetaX11Display], event=event@entry=0x7fff0cf28140)
at ../src/x11/events.c:1407
#10 0x00007fb64d591e6e in meta_x11_display_handle_xevent (event=<optimized out>, x11_display=0x556cf9dbc230 [MetaX11Display]) at ../src/x11/events.c:1867
#11 xevent_filter (xevent=<optimized out>, event=<optimized out>, data=0x556cf9dbc230) at ../src/x11/events.c:1909
#12 0x00007fb64d1e1fdf in gdk_event_apply_filters (xevent=xevent@entry=0x7fff0cf28140, event=event@entry=0x556cf9ea6de0, window=window@entry=0x0)
at gdkeventsource.c:79
#13 0x00007fb64d1e230b in gdk_event_source_translate_event (xevent=0x7fff0cf28140, event_source=0x556cf99988e0) at gdkeventsource.c:198
#14 _gdk_x11_display_queue_events (display=0x556cf9d7d0e0 [GdkX11Display]) at gdkeventsource.c:341
#15 0x00007fb64d1aa0f4 in gdk_display_get_event (display=display@entry=0x556cf9d7d0e0 [GdkX11Display]) at gdkdisplay.c:441
#16 0x00007fb64d1e2076 in gdk_event_source_dispatch (source=source@entry=0x556cf99988e0, callback=<optimized out>, user_data=<optimized out>)
at gdkeventsource.c:363
#17 0x00007fb64e112510 in g_main_dispatch (context=0x556cf9717160) at ../glib/gmain.c:3179
#18 g_main_context_dispatch (context=context@entry=0x556cf9717160) at ../glib/gmain.c:3844
#19 0x00007fb64e1128a0 in g_main_context_iterate (context=0x556cf9717160, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at ../glib/gmain.c:3917
#20 0x00007fb64e112b93 in g_main_loop_run (loop=0x556cf9a943c0) at ../glib/gmain.c:4111
#21 0x00007fb64d56d740 in meta_run () at ../src/core/main.c:676
#22 0x0000556cf8474cad in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:552