GNOME Bugzilla – Bug 720460
Fix a crash in gnome-shell
Last modified: 2018-12-24 17:42:38 UTC
The crash is reproducible as following: - start gnome-shell - open and close the full application view - force a full GC from the looking glass - add or remove a .desktop file in a monitored directory
Created attachment 264193 [details] [review] entry-directories: don't modify a list while iterating it cached_dir_unref() tries to remove the directory from the parent's list of subdirectories, but it is also called when the parent is being freed and iterating with foreach() on its directory list. This is unsafe, so don't do it. Also, fix the logic for remove_subdir() to unref() only when it's right to do so (ie, always, when the function is called, because everything keeps strong references).
Created attachment 264194 [details] [review] entry-directories: protect event handling for directories If a new desktop file is created or deleted in a monitored directory, the desktop cache is cleared completely, and the CachedDir structure is freed, which causes a segfault. Protect it as long as the new event is queued and later handled.
Review of attachment 264193 [details] [review]: Wow, that "unref if references is 0" looks hella broken, yeah.
Review of attachment 264194 [details] [review]: OK.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. (git-bz failed because bugzilla crashed...)
*** Bug 712161 has been marked as a duplicate of this bug. ***
*** Bug 715062 has been marked as a duplicate of this bug. ***