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 420788 - gthumb crashed with SIGSEGV in gth_image_list_get_last_visible()
gthumb crashed with SIGSEGV in gth_image_list_get_last_visible()
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.9.x
Other All
: Normal critical
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2007-03-20 23:26 UTC by daniel
Modified: 2007-05-08 17:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb backtrace (3.88 KB, text/plain)
2007-03-21 17:03 UTC, Todd Zullinger
Details
bugbuddy output (10.81 KB, text/plain)
2007-03-21 17:04 UTC, Todd Zullinger
Details

Description daniel 2007-03-20 23:26:52 UTC
Steps to reproduce:
Gthumb crashed after a search was completed, trying to view the result. Attaching a backtrace.

This is using Ubuntu Feisty, and was originally reported at https://bugs.launchpad.net/ubuntu/+source/gthumb/+bug/91003


Stack trace:


Debug backtrace for the crash:

Thread 1 (process 16336)

  • #0 gth_image_list_get_last_visible
    at gth-image-list.c line 1362
  • #1 gfv_get_last_visible
    at gth-file-view-thumbs.c line 591
  • #2 gth_file_view_get_last_visible
    at gth-file-view.c line 1030
  • #3 gth_file_list_update_next_thumb
    at gth-file-list.c line 360
  • #4 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #5 IA__g_closure_invoke
    at gclosure.c line 490
  • #6 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #7 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #8 IA__g_signal_emit
    at gsignal.c line 2243
  • #9 thumb_loader_done_cb
    at thumb-loader.c line 639
  • #10 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #11 IA__g_closure_invoke
    at gclosure.c line 490
  • #12 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #13 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #14 IA__g_signal_emit
    at gsignal.c line 2243
  • #15 image_loader_stop_common
    at image-loader.c line 712
  • #16 check_thread
    at image-loader.c line 588
  • #17 g_timeout_dispatch
    at gmain.c line 3422
  • #18 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #19 g_main_context_iterate
    at gmain.c line 2677
  • #20 IA__g_main_loop_run
    at gmain.c line 2881
  • #21 IA__gtk_main
    at gtkmain.c line 1171
  • #22 main
    at main.c line 804


Other information:
Comment 1 Todd Zullinger 2007-03-21 10:58:40 UTC
I can confirm a similar crash (still present in 2.10.0).  I've built gthumb on Fedora Core 6, which includes Gnome 2.16.3.  If it'd be helpful I can provide a backtrace as well.
Comment 2 Michael Chudobiak 2007-03-21 11:56:29 UTC
Todd,

Yes, please add your backtrace here.

- Mike
Comment 3 Michael Chudobiak 2007-03-21 12:07:59 UTC
Are there situations where this bug can be reliably reproduced?

- Mike
Comment 4 Todd Zullinger 2007-03-21 17:02:33 UTC
Hi Mike,

Sorry for not including the steps to reproduce.  Who'd have thunk that would be useful in debugging? :)

Steps to reproduce:

1. Open gthumb
2. Browse to an image folder
3. Click Search in main window
4. Leave all settings in search box at their defaults
5. Click Search in search window
6. Click View in search progress window when it appears

I think this may have something to do with generating the thumbnails.  If I wait
for a while after the search completes and the View button becomes active, then
there isn't a crash.  If I click on the View button soon after it appears then I
get the crash.  Hopefully you can reproduce this without much fiddling.  Let me
know if there is any other info I can get you to help.

I'll attach bug buddy and gdb output as well.

Thanks!
Comment 5 Todd Zullinger 2007-03-21 17:03:31 UTC
Created attachment 85055 [details]
gdb backtrace
Comment 6 Todd Zullinger 2007-03-21 17:04:07 UTC
Created attachment 85056 [details]
bugbuddy output
Comment 7 Michael Chudobiak 2007-03-22 12:46:30 UTC
Distribution: Fedora Core release 6 (Zod)
Gnome Release: 2.16.3 2007-01-31 (Red Hat, Inc)
BugBuddy Version: 2.16.0

System: Linux 2.6.19-1.2911.fc6 #1 SMP Sat Feb 10 15:51:47 EST 2007 i686
X Vendor: The XFree86 Project, Inc
X Vendor Release: 40300000
Selinux: No
Accessibility: Disabled

Memory status: size: 113405952 vsize: 0 resident: 113405952 share: 0 rss: 24662016 rss_rlim: 0
CPU usage: start_time: 1174567411 rtime: 0 utime: 309 stime: 0 cutime:289 cstime: 0 timeout: 20 it_real_value: 0 frequency: 1

Backtrace was generated from '/usr/bin/gthumb'

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1208183072 (LWP 12982)]
[New Thread -1277863024 (LWP 13000)]
[New Thread -1276126320 (LWP 12994)]
[New Thread -1275597936 (LWP 12993)]
[New Thread -1275069552 (LWP 12992)]
[New Thread -1252492400 (LWP 12988)]
[New Thread -1251964016 (LWP 12987)]
0x009f1402 in __kernel_vsyscall ()

Thread 1 (Thread -1208183072 (LWP 12982))

  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 870
  • #3 <signal handler called>
  • #4 gth_image_list_get_last_visible
    at gth-image-list.c line 1361
  • #5 gfv_get_last_visible
    at gth-file-view-thumbs.c line 563
  • #6 gth_file_view_get_last_visible
    at gth-file-view.c line 1007
  • #7 gth_file_list_update_next_thumb
    at gth-file-list.c line 365
  • #8 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #9 IA__g_closure_invoke
    at gclosure.c line 490
  • #10 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #11 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #12 IA__g_signal_emit
    at gsignal.c line 2243
  • #13 thumb_loader_done_cb
    at thumb-loader.c line 634
  • #14 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #15 IA__g_closure_invoke
    at gclosure.c line 490
  • #16 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #17 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #18 IA__g_signal_emit
    at gsignal.c line 2243
  • #19 image_loader_stop_common
    at image-loader.c line 712
  • #20 check_thread
    at image-loader.c line 588
  • #21 g_timeout_dispatch
    at gmain.c line 3422
  • #22 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #23 g_main_context_iterate
    at gmain.c line 2677
  • #24 IA__g_main_loop_run
    at gmain.c line 2881
  • #25 IA__gtk_main
    at gtkmain.c line 1148
  • #26 main
    at main.c line 834
  • #0 __kernel_vsyscall

Comment 8 Michael Chudobiak 2007-03-22 13:03:51 UTC
Hmm, older versions of gThumb returned a list of filenames in the search function. The current version returns a list of thumbnails. I can fix the crashes temporarily with this:


--- libgthumb/gth-image-list.c  (revision 1508)
+++ libgthumb/gth-image-list.c  (working copy)
@@ -1320,7 +1320,9 @@
 int
 gth_image_list_get_first_visible (GthImageList *image_list)
 {
-       g_return_val_if_fail (GTH_IS_IMAGE_LIST (image_list), -1);
+       if (image_list == NULL)
+               return -1;
+
        return get_first_visible_at_offset (image_list, image_list->priv->vadjustment->value);
 }
 
@@ -1357,7 +1359,9 @@
 int
 gth_image_list_get_last_visible (GthImageList *image_list)
 {
-       g_return_val_if_fail (image_list != NULL, -1);
+       if (image_list == NULL)
+               return -1;
+
        return get_last_visible_at_offset (image_list,
                                           (image_list->priv->vadjustment->value
                                            + image_list->priv->vadjustment->page_size));


but maybe these functions should be left as-is and the search code should be corrected instead. I haven't had time to look at that.


- Mike
Comment 9 Michael Chudobiak 2007-03-22 13:59:52 UTC
I think dlg-search.c:search_finished calls

gtk_widget_set_sensitive (data->p_view_button, TRUE);

too early. It should wait for a file_list "done" signal, probably.

- Mike
Comment 10 Paolo Bacchilega 2007-03-22 15:07:15 UTC
I've committed a patch in order to fix this, please test current svn 
Comment 11 Michael Chudobiak 2007-03-22 15:33:05 UTC
The patch seems to work for me.

- Mike
Comment 12 Todd Zullinger 2007-05-08 17:51:23 UTC
I know this is long closed, but I wanted to apologize for not following up to confirm that it was fixed (damn intrusions and obligations).

Thank you Paolo and Mike for the great work and quick fixes!  I owe you both a few tasty beverages some Friday Afternoon in the Universe. :)