depth of xmlParserMaxDepth insufficient

Bug #297070 reported by amit on 2008-11-12
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned

Bug Description

I am trying to import svg file of size 500kb.But inkscape failed to load it.On console it is showing parser error:Excessive depth in document:change xmlParserMaxDepth=1024.Any suggestions how to fix the bug?

mahfiaz (mahfiaz) wrote :

I compiled the libxml from source setting xmlParserMaxDepth=2048, but this document takes several minutes to load and at least two minutes for every ungroup step. This would take ages.

mahfiaz (mahfiaz) wrote :

Ishmal found out, that adding (xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink") (without brackets) to the starting svg element would correct the thing.

To remove unnecessary groups the attached php script can be handy.

bbyak (buliabyak) wrote :

In rev 9775 I added XML_PARSE_HUGE flag to libxml parsing call, so now it no longer errors out on more than 256 nested groups. This bug and my own experience show that such documents happen from time to time, e.g. on import from PDF. The file attached here now opens normally (after fixing its namespace problem) and is editable, even if slow.

Changed in inkscape:
status: New → Fix Released
su_v (suv-lp) wrote :

> status: New → Fix Released

It seems that the fix for this report in r9775 was never backported to the stable release branch:
<https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/9775>

trunk, line 305:
<https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/xml/repr-io.cpp#L296>

0.48.x, line 297:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/RELEASE_0_48_BRANCH/view/head:/src/xml/repr-io.cpp#L288>

Setting bug status to 'Fix Committed' with milestone 0.49.

Changed in inkscape:
milestone: none → 0.49
status: Fix Released → Fix Committed
su_v (suv-lp) on 2012-05-06
tags: added: backport-proposed
ScislaC (scislac) on 2012-08-17
Changed in inkscape:
milestone: 0.49 → 0.48.4
tags: removed: backport-proposed
Kris (kris-degussem) wrote :

Backport was in revision 9913

Changed in inkscape:
importance: Undecided → Medium
su_v (suv-lp) wrote :

The changes from r9775 (trunk) / r9913 (0.48.x) also help with
- Bug #1073315 “huge text node: out of memory”
  <https://bugs.launchpad.net/inkscape/+bug/1073315>

(parsing error - so far only reported for Fedora - when loading a file with huge embedded bitmap image (> 10MB uuencoded data in single text node)).

Ted Gould (ted) on 2012-12-17
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers