GNOME Bugzilla – Bug 706697
crash in find-duplicates extension with gtk+-3.8.x
Last modified: 2013-08-24 07:34:56 UTC
Created attachment 252961 [details] [review] patch to solve the issue From Fedora bug report https://bugzilla.redhat.com/show_bug.cgi?id=1000559: When using the find-duplicates extension and selecting a folder using pre-defined bookmarks like "Desktop", gthumb crashes. How to reproduce: - Edit -> Find Duplicates - Select e.g. "Desktop" with the gtkfilechooserbutton - Find Current result: Program received signal SIGSEGV, Segmentation fault. gth_file_source_set_cancellable (file_source=0x0, cancellable=0x22a02f0) at gth-file-source.c:945 945 _g_object_unref (file_source->priv->cancellable); (gdb) bt
+ Trace 232417
Comments: - it works for any explicitly chosen directories using "Other..." - it does not work with the other pre-defined directories - it works fine with gtk+-3.6.x - it seems to be a problem caused by changes to the gtkfilechooserbutton in gtk+-3.8.x - reason for the issue: dlg-find-duplicates.c: folder = gtk_file_chooser_get_current_folder_file (GTK_FILE_CHOOSER ( _gtk_builder_get_widget (data->builder, "location_filechooserbutton"))); returns NULL for these kind of directories - most likely following functions don't expect folder to be NULL - according to https://bugzilla.gnome.org/show_bug.cgi?id=701271, gtk_file_chooser_get_file should be used instead - a quick test with the attached patch was positive, but I have not thoroughly tested whether it always select the correct directory... - additionally the return value of that function should be checked for NULL or the following functions using that value should be aware that "folder" can be NULL
Patch applied to both master and gthumb-3-2 branches, thank you.