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 320342 - error stomping on image load
error stomping on image load
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-10-31 19:41 UTC by Paolo Borelli
Modified: 2005-11-09 20:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paolo Borelli 2005-10-31 19:41:24 UTC
in eog-image.c::eog_image_real_load() at line 800 you have

	if (!gdk_pixbuf_loader_close (loader, error )) {
		failed = TRUE;
	}

however error may already have been set in the while loop above that, thus
triggering the assertion that (error == NULL || *error == NULL) in
gdk_pixbuf_loader_close.

Not sure what is the right thing to do... maybe errors on close should just be
ignored if an error was encountered already.
Comment 1 Lucas Rocha 2005-11-08 04:19:47 UTC
Paolo, could be please describe the context in which this error arises?
Comment 2 Paolo Borelli 2005-11-08 08:15:49 UTC
I don't recall what I was doing... I suspect reading a damaged image file.
However the problem can be seen by simple code inspection, for intance:


	while (!priv->cancel_loading) {

		...		
		if (!gdk_pixbuf_loader_write (loader, buffer, bytes_read, error)) {
			failed = TRUE;

			break; /* here we break out of the while loop and error is set */
		}

		...
	}


	if (!gdk_pixbuf_loader_close (loader, error)) { /* here we pass an already used
error, thus triggering the assertion */
		failed = TRUE;
	}
Comment 3 Paolo Borelli 2005-11-09 20:49:01 UTC
2005-11-09  Paolo Borelli  <pborelli@katamail.com>

	* libeog/eog-image.c (eog_image_real_load): don't stomp on an
	already	set GError. Fixes bug #320342.