GNOME Bugzilla – Bug 728765
[PATCH] Crashes on startup if shows "required directories missing" dialog
Last modified: 2014-04-23 21:25:39 UTC
Nautilus crashes on startup if the "required directories missing" dialog appears. This is because the code is mistakenly assuming that gtk_application_get_windows() only contains objects of type NautilusWindow. The dialog is an object of type GtkDialog. The solution is to update all uses of gtk_application_get_windows() to skip windows that aren't NautilusWindow. This is one of the top crashers being detected on errors.ubuntu.com. I'm not sure what is triggering this dialog for these users but by modifying nautilus to always show the dialog I can confirm the crash and the fix.
Created attachment 274918 [details] [review] Ignore windows that are not NautilusWindow when using gtk_application_get_windows () to avoid crashes when accessing things like GtkDialog.
The easiest way I've found to reproduce is to create an invalid nautilus configuration directory (~/.config/nautilus) by replacing it with a file instead (i.e. touch ~/.config/nautilus).
Comment on attachment 274918 [details] [review] Ignore windows that are not NautilusWindow when using gtk_application_get_windows () to avoid crashes when accessing things like GtkDialog. Thanks, looks good to me.