depth of xmlParserMaxDepth insufficient

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

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="" xmlns: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:

trunk, line 305:

0.48.x, line 297:

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”

(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