GNOME Bugzilla – Bug 137108
Selecting "Filesystem" in the File Selection dialog box crashes
Last modified: 2004-12-22 21:47:04 UTC
Distribution: Gentoo Base System version 1.4.3.13p1 Package: gtk+ Severity: normal Version: GNOME2.5.91 unspecified Gnome-Distributor: GARNOME Synopsis: Selecting "Filesystem" in the File Selection dialog box crashes Bugzilla-Product: gtk+ Bugzilla-Component: GtkFileSel Bugzilla-Version: unspecified BugBuddy-GnomeVersion: 2.0 (2.5.91) Description: Description of the crash: Everytime I try to select the root "Filesystem" shortcut in the File Selection dialog box, it crashes. Steps to reproduce the crash: 1. Create new launcher on desktop 2. Select browse 3. Choose "Filesystem" Expected Results: Crash How often does this happen? Every time Additional Information: I'm using garnome for 2.5.91 Debugging Information: Backtrace was generated from '/home/test/garnome/bin/gnome-desktop-item-edit' Using host libthread_db library "/lib/libthread_db.so.1". 0x40bde9c8 in waitpid () from /lib/libpthread.so.0
+ Trace 45090
------- Bug moved to this database by unknown@bugzilla.gnome.org 2004-03-13 16:35 ------- The original reporter (test@_HOSTNAME_.gelwarg.net) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org. Reassigning to the default owner of the component, gtk-bugs@gtk.org.
This crash part of this ought to be fixed by making error_dialog handle a NULL path. The underlying cause can, I think, be fixed by... 1. Apply the gtkfilechooserdefault.c part of the latest patch from http://bugzilla.gnome.org/show_bug.cgi?id=136185. (That makes it stop using get_file_info for verifying directories, in particular the root directory for which it doesn't work.) 2. Adding the following to gtk_file_system_unix_get_folder (which will make check_is_folder from 1 actually work): if (!g_file_test (filename, G_FILE_TEST_IS_DIR)) { int save_errno = errno; gchar *filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, N ULL); g_set_error (error, GTK_FILE_SYSTEM_ERROR, GTK_FILE_SYSTEM_ERROR_NONEXISTENT, _("file is not a directory '%s': %s"), filename_utf8 ? filename_utf8 : "???", g_strerror (save_errno)); g_free (filename_utf8); return NULL; } This part should, IMHO, be done in all cases.
*** Bug 137123 has been marked as a duplicate of this bug. ***
This was trigger by the trailing-slash patch. I fixed that and the crash. (2) above was fixed also, (1) not.