GNOME Bugzilla – Bug 311925
Crash after adding new non-image files to a directory eog watches
Last modified: 2007-01-22 22:03:32 UTC
Steps to reproduce: I don't know how reproducable this is - it has only happened once (so no symbols on the stack trace). I had opened some files from the command line (attached below) using the command 'eog * &'. This tried to open a directory too leaving a blank window which I closed. Some hours later - and after some time in hibernation too - I get the crash dialog while working with a completely different app. (This shouldn't be surprising since it is crashing in the idle handler). Stack trace: (gdb) bt
+ Trace 62061
Other information: This is using the Ubuntu Breezy packages installed a matter of days ago. I'll attach the image files soon.
Created attachment 49914 [details] The first file associated with the crashed program.
Created attachment 49915 [details] The second file associated with the crash. As an additional clue, the directory that eog tried to open was a CVS directory. A cvs commit had ocurred a few minutes earlier. There was also a thrid image file, but that had been closed well before the laptop went into hibernation.
To reproduce: run eog (HEAD) with a command line that contains a bare directory name (just "." doesn't work). Once it has launched start putting new non-image files in. I haven't worked out the common cause, but copies of a CVS Repository file seem to work OK. It may crash on one copy, it may crash on two, but it always comes up with something like: Eog-ERROR **: file eog-collection-item.c: line 320 (job_thumb_create): assertion failed: (*error != NULL) aborting... Xlib: unexpected async reply (sequence 0x1eea)! The Xlib line doesn't appear if it crashes. Since the bug has nothing to do with hibernation, I've changed the title appropriately. Also, the new stack trace I'm getting is crashing somewhere below eog_image_list_iter_equal, but I'm guessing it is still the same basic crash, I'll try and get a stack trace with debugging symbols soon.
(gdb) thread apply all bt
+ Trace 62654
I have found the cause, job_thumb_create expects eog_thumbnail_load to always set the error variable if an error occurs. eog_thumbnail_load in turn calls create_thumbnail, which has the following code: if (!gnome_thumbnail_factory_has_valid_failed_thumbnail (factory, data->uri_str, data->mtime) && gnome_thumbnail_factory_can_thumbnail (factory, data->uri_str, data->mime_type, data->mtime)) { thumb = gnome_thumbnail_factory_generate_thumbnail (factory, data->uri_str, data->mime_type); if (thumb != NULL) { gnome_thumbnail_factory_save_thumbnail (factory, thumb, data->uri_str, data->mtime); } else { set_thumb_error (error, EOG_THUMB_ERROR_GENERIC, "Thumbnail creation failed"); } } If the first if statement fails (in this case I think it is the gnome_thumbnail_factory_can_thumbnail() call) then the code will continue with *error unset and thumb untouched (i.e. NULL). This eventually gets caught by the assertion in job_thumb_create. A simple-minded patch that just calls set_thumb_error as the else clause of the outer if statement follows.
Created attachment 51452 [details] [review] A patch to fix the bug. Nothing subtle here, we just make sure the error value is set in all failure cases. Should be simple and uncontrovesial enough for the 2.12 release.
Callum, I cannot reproduce this bug with EOG 2.12.1. There were several internal error handling improvements from 2.11.x to 2.12.x. So, this bug seems to be solved in EOG 2.12.x series. Do you confirm?
Any updates here? Marking as NEW.
Sorry for the delay, I was on a tropical island. I can still reproduce it with 2.12.1 (Ubuntu Breezy). Exactly the same error on the console.
*** Bug 316808 has been marked as a duplicate of this bug. ***
Applied in HEAD and gnome-2-12 branches. Thanks!
*** Bug 319558 has been marked as a duplicate of this bug. ***
*** Bug 322454 has been marked as a duplicate of this bug. ***
*** Bug 322354 has been marked as a duplicate of this bug. ***
*** Bug 321160 has been marked as a duplicate of this bug. ***
*** Bug 318867 has been marked as a duplicate of this bug. ***
*** Bug 317665 has been marked as a duplicate of this bug. ***
*** Bug 317194 has been marked as a duplicate of this bug. ***
Marking the patch committed as of Comment #11 and Comment #6
*** Bug 324817 has been marked as a duplicate of this bug. ***
*** Bug 331521 has been marked as a duplicate of this bug. ***
*** Bug 332512 has been marked as a duplicate of this bug. ***
*** Bug 334456 has been marked as a duplicate of this bug. ***
*** Bug 361392 has been marked as a duplicate of this bug. ***
*** Bug 399421 has been marked as a duplicate of this bug. ***