crash (Pattern to Objects, Clip > Release) with xml:space="preserve"

Bug #854617 reported by su_v on 2011-09-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Johan Engelen

Bug Description

Steps to reproduce:
1) download sample SVG file [1]
2) open in Inkscape
3) select rectangle (background) with checkerboard pattern
4) apply 'Object > Pattern > Pattern to objects'

-> no crash in 0.48.2 (but console warnings)
-> crash in current trunk (backtrace attached, note the difference between debug and optimized build)

Not reproduced when transferring the pattern with 'copy&paste style' into a new Inkscape document (sample SVG attached, with manually added viewBox definition and size of pattern-filled rect changed to "100%")

Tested on Mac OS X 10.5.8 (i386), with
- Inkscape 0.48.1, 0.48.2,
- Inkscape 0.48+devel r10325, 0.48+devel r10639

[1] Source of Latin-1 encoded file:
<> (Encoding: ISO-8859-1)
(problem noticed while testing for bug #567014)

Alternatively, open the files in inkscape (cli only) from the web directly:
$ inkscape
$ inkscape
$ inkscape

su_v (suv-lp) wrote :
description: updated
jazzynico (jazzynico) wrote :

Crash reproduced on Windows XP, Inkscape trunk revisions 10614 and 10568.
Warning messages also noticed with 0.48.2.

But changing the encoding attribute with UTF-8 doesn't fix the issue. What makes you think it's related to encoding?

Changed in inkscape:
status: New → Confirmed
jazzynico (jazzynico) wrote :

Apparently, removing the xml:space="preserve" attribute in the svg element fixes the document.

su_v (suv-lp) wrote :

> What makes you think it's related to encoding?

Desperation? ;) I tried so many different subtle changes to both files (downloaded, and recreated in Inkscape), and could not reduce it to one local change to consistently let inkscape crash (or reproduce it with a newly created file).

At one point, the encoding seemed the only difference left… but when I wanted to verify it again before filing the report, suddenly it didn't make a difference any more. I left it in the summary anyway (who knows - maybe it does matter when parsing/solving the URI reference to the pattern?).

su_v (suv-lp) wrote :

Adding the line
to the top-level <svg> node in the file 'pattern-to-object-3-viewBox-scaled-5.svg' does not allow to reproduce the crash for me (pattern converts to objects (2 rects), with the known warnings on the console, but no crash).

jazzynico (jazzynico) wrote :

I guess the crash can be triggered by the combination of xml:space="preserve" and white spaces badly placed in the document (probably in the pattern's definition).

jazzynico (jazzynico) wrote :

Got it! Removing all the white spaces in the pattern element value fixes the crash.
Minimal test files attached.

jazzynico (jazzynico) wrote :
jazzynico (jazzynico) wrote :
summary: - crash (Pattern to Objects) in ISO-Latin-1 encoded file
+ crash (Pattern to Objects) with xml:space="preserve"

Still crashing on Windows XP, Inkscape trunk 11655.

Setting importance to medium (crash under very obscure or unlikely circumstances).

Changed in inkscape:
importance: Undecided → Medium
status: Confirmed → Triaged

Based on the same original file, current trunk (r11891) also crashes
when releasing a clip if the attribute 'xml:space="preserve"' is present
for the top-level <svg> node.

su_v (suv-lp) on 2012-11-23
tags: added: clipping
summary: - crash (Pattern to Objects) with xml:space="preserve"
+ crash (Pattern to Objects, Clip > Release) with xml:space="preserve"
su_v (suv-lp) on 2012-11-23
Changed in inkscape:
milestone: none → 0.49
Johan Engelen (johanengelen) wrote :

should be fixed in r12742

jazzynico (jazzynico) wrote :

Fix confirmed on Windows XP, trunk revision 12742.

Changed in inkscape:
milestone: 0.49 → none
status: Triaged → Fix Released
Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
To post a comment you must log in.