Skip to content

dnd: guard against disposed dragActor in _onAnimationComplete and _dragComplete#13633

Open
timstoop wants to merge 1 commit intolinuxmint:masterfrom
timstoop:fix/dnd-fake-group-disposed
Open

dnd: guard against disposed dragActor in _onAnimationComplete and _dragComplete#13633
timstoop wants to merge 1 commit intolinuxmint:masterfrom
timstoop:fix/dnd-fake-group-disposed

Conversation

@timstoop
Copy link

Summary

Fixes #13235

When Expo closes via hot corner, it creates and destroys Clutter.Group (overridden as fake_group in overrides.js) actors during the close animation. If a drag is in progress at that moment, dnd.js still holds a reference to the now-disposed actor in this._dragActor. When the drag ends, _onAnimationComplete and _dragComplete attempt to access the finalized GObject, triggering Gjs-CRITICAL errors and a CPU spin that freezes the desktop.

  • Add is_finalized() check in _onAnimationComplete to bail out gracefully when the drag actor has been destroyed by C code before the animation completed
  • Add is_finalized() guard in _dragComplete before calling util_set_hidden_from_pick on the drag actor

Tested on Linux Mint 22.3 / Cinnamon 6.6.7 with dual monitors and NVIDIA RTX 3050. No new fake_group disposed errors in ~/.xsession-errors after fix, where previously they appeared consistently when using hot corners to trigger Expo.

Note: this fix was developed with AI assistance (Claude).

…agComplete

When Expo closes via hot corner, it destroys Clutter.Group (fake_group)
actors that may still be referenced as _dragActor in an active drag.
Accessing a finalized GObject causes Gjs-CRITICAL errors and a CPU spin
that freezes the desktop.

Add is_finalized() checks before accessing the dragActor in both
_onAnimationComplete and _dragComplete to bail out gracefully when the
actor has already been destroyed by C code.

Fixes: linuxmint#13235

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Cinnamon freezes with Gjs-CRITICAL "dnd.js fake_group disposed" errors when using hot corners to trigger Expo/Workspace switcher

1 participant