GNOME Bugzilla – Bug 770197
eog leaks error message if loading an SVG fails
Last modified: 2016-08-21 13:34:12 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.
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