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 770197 - eog leaks error message if loading an SVG fails
eog leaks error message if loading an SVG fails
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-21 13:10 UTC by Felix Riemann
Modified: 2016-08-21 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Felix Riemann 2016-08-21 13:10:25 UTC
(Comment from André Klapper to bug 770143 comment 1)
> Using eog-3.20.3-1.fc24.x86_64, I get no crash but the following output:
> 
> 
> (eog:3744): GLib-WARNING **: GError set over the top of a previous GError or
> uninitialized memory.
> This indicates a bug in someone's code. You must ensure an error is NULL
> before it's set.
> The overwriting error message was: Error domain 1 code 73 on line 1 column 4
> of file:///home/user/crashEOG.svg: Couldn't find end of Start Tag \xf4
> 
> ...


It turns out if loading an SVG fails while writing to the RSVG handle, eog receives a GError from librsvg when calling rsvg_handle_close(). However, the error was already set while writing to the handle.

This leaks the first error message and causes the above message.
Comment 1 Felix Riemann 2016-08-21 13:34:12 UTC
Errors from librsvg are now handled similar to errors from GdkPixbuf.

commit 55036c6d55b06e82a480b559d59f5effae26399d
Author: Felix Riemann <>
Date:   Sun Aug 21 15:32:31 2016 +0200

    EogImage: Fix leaked GError when loading an SVG fails
    
    Make sure the GError is not overwritten when closing the
    handle if loading already failed earlier on.
    This will handle SVG errors similar to errors from GdkPixbuf.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770197