Skip to content

fix: prevent dash icon teardown crashes - #340

Open
mihaly044 wants to merge 2 commits into
icedman:mainfrom
mihaly044:fix/gnome50-dash-teardown
Open

fix: prevent dash icon teardown crashes#340
mihaly044 wants to merge 2 commits into
icedman:mainfrom
mihaly044:fix/gnome50-dash-teardown

Conversation

@mihaly044

@mihaly044 mihaly044 commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Prevent GNOME Shell from aborting when a transient application item is removed from the hidden Dash2Dock Lite Dash.

Fixes the teardown path reported in #299 on GNOME 49/50.

Root cause

The crash is the Clutter invariant failure:

clutter_actor_destroy_all_children:
assertion failed: (self->priv->n_children < prev_n_children)

A diagnostic Dash subclass recorded the active redisplay path in shared memory. At the crash it was left at custom begin 21, proving that the failing dash.js:77 → dash.js:788 stack belonged to the extension-created Dash rather than the overview Dash.

Inspection of the fresh core resolved the recursive actor chain as:

DashIcon → StWidget → BaseIcon → StBoxLayout → StBin → StIcon

The assertion fired in the StBin that owns the BaseIcon texture. Dash2Dock Lite made that nested GNOME-owned StIcon reactive and hover-tracked. Removing a transient app while its texture was under pointer input could therefore drive a hover/style refresh while the BaseIcon subtree was being destroyed, allowing the icon bin child to be refreshed during destroy_all_children().

Changes

  • Keep input on the owning AppIcon or Show Apps toggle button instead of the nested texture.
  • Leave GNOME-owned inner StIcon textures non-reactive and not hover-tracked.
  • Stop overriding Show Apps button reactivity and toggle state.
  • Do not force private icon-texture creation during icon discovery.
  • Do not attach teardown callbacks to nested StIcon actors.
  • Treat Dash labels as borrowed references and stop removing GNOME-owned separators.

The magnification renderer, favorites, running indicators, and dock layout remain unchanged.

Verification

Tested on Fedora 44, GNOME Shell 50.3, Wayland, Dash2Dock Lite v100.

Before the final fix:

  • Reproduced two GNOME Shell SIGABRT crashes in the VM.
  • The original stress workload crashed at cycle 70.
  • A Showtime-heavy workload with dock hover/click input crashed at cycle 5 of 200.

After the fix, using the same Showtime-heavy workload and pointer pattern:

  • Completed 200 of 200 cycles with Shell PID 1371 unchanged and zero new cores.
  • Completed a second 80 of 80 cycles with the same Shell PID and zero new cores.
  • Verified the Show Apps button opens the application grid.
  • Verified normal dock activation by launching Firefox.
  • Found no Clutter assertion, disposed-object error, JS error, or TypeError in either test journal.
  • Passed node --check and git diff --check.

This is related to, but distinct from, #336, which reports a null icon during _adjustIconSize().

@mihaly044 mihaly044 changed the title fix: avoid mutating actors during dash teardown fix: prevent dash icon teardown crashes Jul 21, 2026
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