GNOME Bugzilla – Bug 787614
eog fails to open large SVGZ files (works after unzipping it): "Huge input lookup"
Last modified: 2021-06-19 08:47:06 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.
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.
"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?
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
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?
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.