Skip to content

Defer the panel-button toggle out of the press gesture (shell crash, GNOME 48+)#165

Open
daniel-g-carrasco wants to merge 1 commit into
icedman:mainfrom
daniel-g-carrasco:fix/press-gesture-toggle-crash
Open

Defer the panel-button toggle out of the press gesture (shell crash, GNOME 48+)#165
daniel-g-carrasco wants to merge 1 commit into
icedman:mainfrom
daniel-g-carrasco:fix/press-gesture-toggle-crash

Conversation

@daniel-g-carrasco

Copy link
Copy Markdown

Symptom

Clicking the search-light panel button can abort the whole GNOME Shell (on Wayland this ends the session; after a couple of crashes GNOME drops into safe-mode and disables all extensions):

Clutter:ERROR clutter-gesture.c:544 set_state:
  assertion failed: (new_state == CLUTTER_GESTURE_STATE_POSSIBLE)
  clutter_press_gesture_point_began <- clutter_gesture_handle_event

Cause

The 'button-press-event' handler calls _toggle_search_light() → show() synchronously while the Clutter press gesture is still in flight. show() reparents the entry/search actors and grabs key focus; mutating the actor tree mid-gesture corrupts the gesture state machine, and the next gesture point event asserts → SIGABRT.

Fix

Defer the toggle with GLib.idle_add so the press gesture completes before any actor surgery runs — imperceptible (one idle tick). GLib/Clutter are already imported.

This is the sibling of #164, which fixes the same class of crash on the app-launch (_release_ui) path. Likely the same root cause behind #82 ("crash if used first after boot") and #133 ("crash on startup use when Tiling Shell is also enabled").

Testing

GNOME 50 / Fedora 44: before, clicking the panel button reliably SIGABRTs gnome-shell (coredump-confirmed on 2026-06-13); after, it opens normally and stays stable.

…GNOME 48+)

Clicking the panel button can abort the whole shell:

  Clutter:ERROR clutter-gesture.c:544 set_state:
    assertion failed: (new_state == CLUTTER_GESTURE_STATE_POSSIBLE)
  clutter_press_gesture_point_began <- clutter_gesture_handle_event

The 'button-press-event' handler calls _toggle_search_light() -> show()
synchronously while the Clutter press gesture is still in flight. show()
reparents the entry/search actors and grabs key focus; mutating the actor
tree mid-gesture corrupts the gesture state machine, and the next gesture
point event asserts -> SIGABRT. On Wayland this ends the whole session.

Defer the toggle with GLib.idle_add so the gesture completes before any
actor surgery runs (imperceptible, one idle tick). Sibling of icedman#164, which
fixes the same class of crash on the app-launch (_release_ui) path.

Tested on GNOME 50 / Fedora 44: before, clicking the panel button reliably
SIGABRTs gnome-shell (coredump-confirmed); after, it opens normally.
Likely the same root cause as icedman#82 and icedman#133.
@daniel-g-carrasco

Copy link
Copy Markdown
Author

Part of #166 (the full GNOME 50 / Clutter 18 root-cause + the other call sites that still need the same treatment) — this PR is the press-gesture deferral piece.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant