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 787614 - eog fails to open large SVGZ files (works after unzipping it): "Huge input lookup"
eog fails to open large SVGZ files (works after unzipping it): "Huge input lo...
Status: RESOLVED OBSOLETE
Product: eog
Classification: Core
Component: image viewer
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-13 08:48 UTC by squidboy
Modified: 2021-06-19 08:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description squidboy 2017-09-13 08:48:35 UTC
eog fails to load large SVGZ files with the error "Error domain 1 code 1 on line 1 column 1 of file:///home/eliasen/prog/frink/samples/timezones.svgz: internal error: Huge input lookup"

The "huge input lookup" error might be a problem with using the wrong memory model in the XML parser.  The following discusses a potential fix, by setting the :
https://stackoverflow.com/questions/43133981/simplexml-parser-error-huge-input-lookup

I would attach a (large) SVGZ file that exhibits the problem, but your file size limit is 3600 kB and the file is 37 MB.  I'll host the file temporarily at 

https://futureboy.us/temp/timezones.svgz

but I will remove the file if downloads are excessive.
Comment 1 squidboy 2017-09-13 08:51:07 UTC
The same file can be opened in eog if you manually un-GZIP it, which points again to an error in the GZIP compression algorithm.  It also renders fine in Firefox, Chrome, etc.
Comment 2 André Klapper 2017-09-13 15:56:21 UTC
"Error domain 1 code 1 on line 1 column 1 of file:///home/user/timezones.svgz: internal error: Huge input lookup"

This might be an issue in librsvg instead?
Comment 3 squidboy 2017-09-14 06:50:56 UTC
The underlying error message is almost certainly coming from libxml2 which has a default limit of about 9.5 megabytes for an XML document, but this restriction can be lifted by passing the XML_PARSE_HUGE flag to its constructor, as noted before.  It's probably not a bug in libxml2, but rather the way it's being invoked.

More info:

http://making-security-measurable.1364806.n2.nabble.com/libxml2-lxml-Parsing-large-9-5mb-XML-Documents-td7580595.html
Comment 4 squidboy 2017-09-14 06:58:51 UTC
It appears that XML_PARSE_HUGE *is* being set in rsvg-base.c:

https://github.com/GNOME/librsvg/blob/bdc1d2c6975c7882351b3fe0401fee1448444767/rsvg-base.c#L686

and opening the uncompressed SVG file works, as previously reported.  There is apparently some code path when opening the same compressed SVGZ file that may not set this flag?
Comment 5 André Klapper 2021-06-19 08:47:06 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/eog/-/issues/

Thank you for your understanding and your help.