After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728765 - [PATCH] Crashes on startup if shows "required directories missing" dialog
[PATCH] Crashes on startup if shows "required directories missing" dialog
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Crashers
3.12.x
Other Linux
: Normal critical
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
3.12.1
Depends on:
Blocks:
 
 
Reported: 2014-04-22 23:55 UTC by Robert Ancell
Modified: 2014-04-23 21:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ignore windows that are not NautilusWindow when using gtk_application_get_windows () to avoid crashes when accessing things like GtkDialog. (3.94 KB, patch)
2014-04-23 00:00 UTC, Robert Ancell
accepted-commit_now Details | Review

Description Robert Ancell 2014-04-22 23:55:41 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.
Comment 1 Robert Ancell 2014-04-23 00:00:24 UTC
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.
Comment 2 Robert Ancell 2014-04-23 00:20:44 UTC
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 3 Cosimo Cecchi 2014-04-23 16:33:11 UTC
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.