Comment 12 for bug 1285592

Revision history for this message
jonh (jonh-launchpad) wrote :

Here's a report of a repro of both bug and workaround.

I'm using Inkscape 0.48.4 r9939, stock on Ubuntu 14.04LTS. I observed this problem running the Visualize/Measure Path extension. The culprit file has a layer (hidden, but apparently Inkscape ships the *entire* SVG out to extensions, not just what's selected, or even what's visible?) with some raster images on it. The failure dialog pointed directly at a line in the extension intermediate file in /tmp that begins xlink:href="data:image/png;base64,... and continues with about 1.9MB of base64 characters.

I transplanted measure.py and inkex into my ~/.config/inkscape/extensions directory, renamed them, and modified line 139 to say:
        self.document = etree.parse(stream, parser=etree.XMLParser(huge_tree=True))
as suggested above, and the problem is solved. (Although I bet the extension would run faster if we weren't sending the whole document out there, but only the selection! Perhaps a flag in the .inx file could tell inkscape that only the selected bits are needed?)