After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789552 - wayland/surface: Disconnect actor handlers before unassigning role
wayland/surface: Disconnect actor handlers before unassigning role
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-10-27 10:55 UTC by Jonas Ådahl
Modified: 2017-10-27 11:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland/surface: Disconnect actor handlers before unassigning role (2.58 KB, patch)
2017-10-27 10:55 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2017-10-27 10:55:43 UTC
The attached patch fixes the crash pasted below.

The reason seems to have been that when a popup window was destroyed while the
actor was visible, it'd immediately disappear since there is no fade-out
animation. This triggered an assert in the changed-output signal handlers since
they depend on the surface having a role, which they didn't, since we had
already unassigned it.

    Stack trace of thread 21836:
    #0  0x00007f5b122b8c40 raise (libpthread.so.0)
    #1  0x0000556916ed6562 dump_gjs_stack_on_signal_handler (gnome-shell)
    #2  0x00007f5b122b8da0 __restore_rt (libpthread.so.0)
    #3  0x00007f5b11f248a0 raise (libc.so.6)
    #4  0x00007f5b11f25f09 abort (libc.so.6)
    #5  0x00007f5b111e6c06 g_assertion_message (libglib-2.0.so.0)
    #6  0x00007f5b111e6fcc g_assertion_message_expr (libglib-2.0.so.0)
    #7  0x00007f5b0f72888f update_surface_output_state (libmutter-1.so.0)
    #8  0x00007f5b111d08b0 g_hash_table_foreach (libglib-2.0.so.0)
    #9  0x00007f5b0f72a65a meta_wayland_surface_update_outputs_recursively (libmutter-1.so.0)
    #10 0x00007f5b114c16f5 g_closure_invoke (libgobject-2.0.so.0)
    #11 0x00007f5b114d50b0 n/a (libgobject-2.0.so.0)
    #12 0x00007f5b114d9696 g_signal_emit_valist (libgobject-2.0.so.0)
    #13 0x00007f5b114da920 g_signal_emit (libgobject-2.0.so.0)
    #14 0x00007f5b114c7bf6 n/a (libgobject-2.0.so.0)
    #15 0x00007f5b114c36ba g_object_notify_by_pspec (libgobject-2.0.so.0)
    #16 0x00007f5b0fe449ce clutter_actor_real_unmap (libmutter-clutter-1.so)
    #17 0x00007f5b0fe419e3 clutter_actor_set_mapped (libmutter-clutter-1.so)
    #18 0x00007f5b0fe44718 clutter_actor_update_map_state (libmutter-clutter-1.so)
    #19 0x00007f5b0fe44989 clutter_actor_real_unmap (libmutter-clutter-1.so)
    #20 0x00007f5b0fe419e3 clutter_actor_set_mapped (libmutter-clutter-1.so)
    #21 0x00007f5b0fe44718 clutter_actor_update_map_state (libmutter-clutter-1.so)
    #22 0x00007f5b0fe509b2 clutter_actor_real_hide (libmutter-clutter-1.so)
    #23 0x00007f5b114c16f5 g_closure_invoke (libgobject-2.0.so.0)
    #24 0x00007f5b114d5188 n/a (libgobject-2.0.so.0)
    #25 0x00007f5b114d9696 g_signal_emit_valist (libgobject-2.0.so.0)
    #26 0x00007f5b114da920 g_signal_emit (libgobject-2.0.so.0)
    #27 0x00007f5b0fe523de clutter_actor_hide (libmutter-clutter-1.so)
    #28 0x00007f5b0f6cac4a meta_window_actor_after_effects (libmutter-1.so.0)
    #29 0x00007f5b0bb6d1c8 ffi_call_unix64 (libffi.so.6)
    #30 0x00007f5b0bb6cc2a ffi_call (libffi.so.6)
    #31 0x00007f5b10186cbb n/a (libgjs.so.0)
    #32 0x00007f5b10188617 n/a (libgjs.so.0)
    #33 0x0000151d9129d810 n/a (n/a)
    #34 0x0000556919de09b8 n/a (n/a)
    #35 0x0000151d912ec945 n/a (n/a)
Comment 1 Jonas Ådahl 2017-10-27 10:55:54 UTC
Created attachment 362396 [details] [review]
wayland/surface: Disconnect actor handlers before unassigning role

The handlers depend on a role being assigned. Destroying the window
causes it to become unmapped, which would sometimes trigger one of the
handlers, resulting in an is-assigned assert hitting in one of the
handlers. Avoid this by disconnecting the handlers earlier, so that
there is no risk that any them being triggered before the role is
assigned.
Comment 2 Carlos Garnacho 2017-10-27 11:02:11 UTC
Comment on attachment 362396 [details] [review]
wayland/surface: Disconnect actor handlers before unassigning role

Makes sense.
Comment 3 Jonas Ådahl 2017-10-27 11:08:22 UTC
Comment on attachment 362396 [details] [review]
wayland/surface: Disconnect actor handlers before unassigning role

Attachment 362396 [details] pushed as 81341ec - wayland/surface: Disconnect actor handlers before unassigning role
Comment 4 Jonas Ådahl 2017-10-27 11:10:16 UTC
Pushed to master.