GNOME Bugzilla – Bug 389755
Often segfaults when exiting, in collection view
Last modified: 2007-01-30 14:14:29 UTC
This bug was filed in the Debian BTS. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=404325 "When I start eog with a png on the command line, and in the directory of the PNG are also a lot of files, it often crashes when exiting while it is still generating previews in the lower part of the window. So, start up eog with the image and press Q shortly after startup crashes it often." Program received signal SIGSEGV, Segmentation fault.
+ Trace 97088
Thread NaN (LWP 13917)
image = <value optimized out> pixbuf = <value optimized out> uri = <value optimized out> __PRETTY_FUNCTION__ = "job_thumb_create" This is thread 2 (in gdb), apparently the thumbnail creation thread. The simple dup finder suggests bug 320206 and bug 378119 as likely matches.
*** Bug 400881 has been marked as a duplicate of this bug. ***
I can confirm seeing this on Ubuntu Feisty as well (2.17.90-0ubuntu1): Program terminated with signal 11, Segmentation fault.
+ Trace 105798
0x436a7a <job_thumb_create+58>: mov (%rax),%rbp (gdb) print $rax $1 = 0
Created attachment 81334 [details] [review] [INCOMPLETE] quick fix for NULL deref This seems to fix it for me. (Or I haven't hit the same race condition again...)
I'd agree with the simple dup-finder, bug 378119 looks like a dup of this one.
Created attachment 81336 [details] [review] Corrected patch for full thread shutdown. Sorry, this is a more complete patch that fixes the main problem of having job-manager threads continuing to run after the main_loop exits.
Patch looks fine to me, and I can't make eog crash with it. Felix, what do you think?
Well, I am generally not able to reproduce this crash. But the patch looks like a valid fix/workaround to me. I think we should give it a try.
Cool. Could somebody commit it? I'm at work now :-/
Done. I just commited it to trunk as rev. 3509. 2007-01-30 Felix Riemann * libeog/eog-collection-item.c: (job_thumb_create): Workaround problem that the passed object is not valid anymore. * libeog/eog-job-manager.c: (eog_job_manager_quit), (eog_job_manager_init): Cancel all jobs when quitting the main loop. This fixes bug #389755. Patch by Kees Cook.
*** Bug 378119 has been marked as a duplicate of this bug. ***