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 706697 - crash in find-duplicates extension with gtk+-3.8.x
crash in find-duplicates extension with gtk+-3.8.x
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2013-08-24 00:18 UTC by Christian Krause
Modified: 2013-08-24 07:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to solve the issue (633 bytes, patch)
2013-08-24 00:18 UTC, Christian Krause
none Details | Review

Description Christian Krause 2013-08-24 00:18:47 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
  • #0 gth_file_source_set_cancellable
    at gth-file-source.c line 945
  • #1 gth_find_duplicates_exec
    at gth-find-duplicates.c line 1284
  • #2 ok_clicked_cb
    at dlg-find-duplicates.c line 67
  • #3 g_closure_invoke
    from /lib64/libgobject-2.0.so.0
  • #4 signal_emit_unlocked_R
    from /lib64/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /lib64/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /lib64/libgobject-2.0.so.0
  • #7 gtk_real_button_released
    from /lib64/libgtk-3.so.0
  • #8 g_closure_invoke
    from /lib64/libgobject-2.0.so.0
  • #9 signal_emit_unlocked_R
    from /lib64/libgobject-2.0.so.0

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
Comment 1 Paolo Bacchilega 2013-08-24 07:34:56 UTC
Patch applied to both master and gthumb-3-2 branches, thank you.