GNOME Bugzilla – Bug 721439
Reproducible crash moving windows in the overview
Last modified: 2014-01-04 16:34:56 UTC
How to reproduce: 1) Start on a workspace with at least 3 windows 2) Enter the overview 3) Move two windows, from the workspace thumbnail, in between two workspaces, to create two new workspaces 4) The moment you drop the second window, gnome-shell crashes Backtrace:
+ Trace 232997
Correction on the reproducer. This is not about the number of windows, or workspaces getting collected, as I suspected. Instead, it's about memory management of ShellApp being wrong for locally created GDesktopAppInfos. Reliable reproducer: 1) Have an app created from a .local/share/applications file running 2) Move a window from that app to create a new workspace 3) Move any other window to another workspace 4) Crash
Segfaulting at shell-app.c:1011? There's nothing related to GDesktopAppInfo on that line. Is it segfaulting accessing running_state?
(In reply to comment #2) > Segfaulting at shell-app.c:1011? There's nothing related to GDesktopAppInfo on > that line. Is it segfaulting accessing running_state? Indeed I said memory management of ShellApp, not GDesktopAppInfo. The app pointer points to a freed GObject in that function.
Created attachment 265306 [details] [review] ShellWindowTracker: fix reference counting of ShellApp All get_app_from_*() helpers are transfer full, but get_app_from_gapplication_id() was directly returning the result of lookup_app(), which is transfer none. And here it is. Except the culprit was bloatpad and not GMail. Oh well :)
Review of attachment 265306 [details] [review]: Aha, yep. I'm not sure how this worked before. ::: src/shell-window-tracker.c @@ +257,3 @@ } +/** Remove the second *, otherwise gobject-introspection will complain about a mismatched annotation (and emacs will think it's a public function).
Created attachment 265312 [details] [review] ShellWindowTracker: remove gtk-doc marks from private functions static internal functions should be documented with /*, not /**
Attachment 265306 [details] pushed as 6544326 - ShellWindowTracker: fix reference counting of ShellApp Attachment 265312 [details] pushed as 65f00f3 - ShellWindowTracker: remove gtk-doc marks from private functions