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 311925 - Crash after adding new non-image files to a directory eog watches
Crash after adding new non-image files to a directory eog watches
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: image viewer
2.11.x
Other All
: High critical
: ---
Assigned To: EOG Maintainers
EOG Maintainers
: 316808 317665 318867 319558 321160 322354 322454 324817 331521 332512 334456 361392 399421 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-07-29 07:17 UTC by Callum McKenzie
Modified: 2007-01-22 22:03 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
The first file associated with the crashed program. (6.65 KB, image/png)
2005-07-29 07:20 UTC, Callum McKenzie
  Details
The second file associated with the crash. (4.22 KB, image/png)
2005-07-29 07:24 UTC, Callum McKenzie
  Details
A patch to fix the bug. (1.10 KB, patch)
2005-08-28 07:24 UTC, Callum McKenzie
committed Details | Review

Description Callum McKenzie 2005-07-29 07:17:46 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
  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 749
  • #3 <signal handler called>
  • #4 eog_wrap_list_set_model
  • #5 IA__g_closure_invoke
    at gclosure.c line 603
  • #6 signal_emit_unlocked_R
    at gsignal.c line 2508
  • #7 IA__g_signal_emit_valist
    at gsignal.c line 2267
  • #8 IA__g_signal_emit
    at gsignal.c line 2311
  • #9 eog_image_list_add_image
  • #10 eog_image_list_get_iter_by_pos
  • #11 _gnome_vfs_monitor_do_cancel
    from /usr/lib/libgnomevfs-2.so.0
  • #12 g_idle_dispatch
    at gmain.c line 3813
  • #13 IA__g_main_context_dispatch
    at gmain.c line 1934
  • #14 g_main_context_iterate
    at gmain.c line 2565
  • #15 IA__g_main_loop_run
    at gmain.c line 2769
  • #16 IA__gtk_main
    at gtkmain.c line 974
  • #17 main


Other information:
This is using the Ubuntu Breezy packages installed a matter of days ago. I'll
attach the image files soon.
Comment 1 Callum McKenzie 2005-07-29 07:20:31 UTC
Created attachment 49914 [details]
The first file associated with the crashed program.
Comment 2 Callum McKenzie 2005-07-29 07:24:04 UTC
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.
Comment 3 Callum McKenzie 2005-08-28 06:32:29 UTC
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.
Comment 4 Callum McKenzie 2005-08-28 06:33:33 UTC
(gdb) thread apply all bt


Comment 5 Callum McKenzie 2005-08-28 07:21:20 UTC
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.
Comment 6 Callum McKenzie 2005-08-28 07:24:07 UTC
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.
Comment 7 Lucas Rocha 2005-10-18 03:30:02 UTC
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?
Comment 8 Brent Smith (smitten) 2005-10-23 16:24:30 UTC
Any updates here?  Marking as NEW.
Comment 9 Callum McKenzie 2005-10-24 05:30:57 UTC
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.

Comment 10 Lucas Rocha 2005-10-25 01:41:30 UTC
*** Bug 316808 has been marked as a duplicate of this bug. ***
Comment 11 Lucas Rocha 2005-10-25 01:48:12 UTC
Applied in HEAD and gnome-2-12 branches. Thanks!
Comment 12 Lucas Rocha 2005-10-25 12:25:18 UTC
*** Bug 319558 has been marked as a duplicate of this bug. ***
Comment 13 Christian Kirbach 2005-11-25 21:46:16 UTC
*** Bug 322454 has been marked as a duplicate of this bug. ***
Comment 14 Christian Kirbach 2005-11-25 21:46:27 UTC
*** Bug 322354 has been marked as a duplicate of this bug. ***
Comment 15 Christian Kirbach 2005-11-25 21:46:44 UTC
*** Bug 321160 has been marked as a duplicate of this bug. ***
Comment 16 Christian Kirbach 2005-11-25 21:46:56 UTC
*** Bug 318867 has been marked as a duplicate of this bug. ***
Comment 17 Christian Kirbach 2005-11-25 21:47:23 UTC
*** Bug 317665 has been marked as a duplicate of this bug. ***
Comment 18 Christian Kirbach 2005-11-25 21:48:36 UTC
*** Bug 317194 has been marked as a duplicate of this bug. ***
Comment 19 Christian Kirbach 2005-11-25 21:50:38 UTC
Marking the patch committed as of Comment #11 and Comment #6
Comment 20 Elijah Newren 2005-12-28 20:17:15 UTC
*** Bug 324817 has been marked as a duplicate of this bug. ***
Comment 21 Karsten Bräckelmann 2006-02-17 17:30:24 UTC
*** Bug 331521 has been marked as a duplicate of this bug. ***
Comment 22 Sergej Kotliar 2006-02-27 14:28:09 UTC
*** Bug 332512 has been marked as a duplicate of this bug. ***
Comment 23 Sergej Kotliar 2006-03-13 20:19:02 UTC
*** Bug 334456 has been marked as a duplicate of this bug. ***
Comment 24 Elijah Newren 2006-10-11 14:54:21 UTC
*** Bug 361392 has been marked as a duplicate of this bug. ***
Comment 25 Marc-Andre Lureau 2007-01-22 22:03:32 UTC
*** Bug 399421 has been marked as a duplicate of this bug. ***