GNOME Bugzilla – Bug 777691
Be more resilient around inconsistent effect_completed calls
Last modified: 2017-01-26 11:34:24 UTC
I'll try to do a reproducer, but I have a steam game here making gnome-shell abort on app startup most of the times, but not always. It looked like the fullscreening effect had some interaction with a real size change (?), which results on gnome-shell triggering effect completion twice. The gnome-shell side is still pending investigation, I however think mutter should avoid abort()s here. In this case, I see meta_window_actor_effect_completed() checks for unpaired calls, and warn on the ongoing effect, I see this warning being hit: g_warning ("Error in size change accounting."); But right afterwards, the effect_completed() call will still try to thaw the window actor, whose accounting will be also off, and that leads to the more disruptive: g_error ("Error in freeze/thaw accounting"); I think we should avoid at least the thaw() call if the effect_completed() call itself turned out inconsistent, a warning will already be issued hinting there's something off, so IMO there's no need to go head first to something we know will probably terminate the process. I'm attaching a patch adding a boolean that is checked before the thaw() call, although perhaps we should just return and avoid the after_effects() call as well?
Created attachment 344108 [details] [review] compositor: Avoid thaw on inconsistent effect_completed calls If the meta_window_actor_effect_completed() triggers inconsistent accounting, there's also high chances that the thaw call will be unexpected at this time too, which will lead to a g_error(). This makes mutter more lenient to effect_completed() calls of the right type (i.e. those triggering freeze/thaw) being performed more times than necessary in the upper parts. A warning will be issued, but the process won't abort.
This is probably fallout from bug 770345, can you file a new bug to track that?
Review of attachment 344108 [details] [review]: This seems sensible in any case
Just filed bug #777784 for the gnome-shell side.
Attachment 344108 [details] pushed as 2cd78bf - compositor: Avoid thaw on inconsistent effect_completed calls