GNOME Bugzilla – Bug 320342
error stomping on image load
Last modified: 2005-11-09 20:49:01 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.
Paolo, could be please describe the context in which this error arises?
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; }
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.