GNOME Bugzilla – Bug 420788
gthumb crashed with SIGSEGV in gth_image_list_get_last_visible()
Last modified: 2007-05-08 17:51:23 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:
+ Trace 120572
Thread 1 (process 16336)
Other information:
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.
Todd, Yes, please add your backtrace here. - Mike
Are there situations where this bug can be reliably reproduced? - Mike
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!
Created attachment 85055 [details] gdb backtrace
Created attachment 85056 [details] bugbuddy output
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 ()
+ Trace 121119
Thread 1 (Thread -1208183072 (LWP 12982))
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
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
I've committed a patch in order to fix this, please test current svn
The patch seems to work for me. - Mike
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. :)