Comment 0 for bug 1294713

Revision history for this message
su_v (suv-lp) wrote : trunk: Crash when releasing a clip in SVG file based on EMF import

Attached SVG file has this clip-path definition (generated by EMF import of an EMF exported with LibreOffice 4.2):

    <clipPath
       clipPathUnits="userSpaceOnUse"
       id="clipEmfPath1"><rect
   x="0"
   y="0"
   width="743.93488"
   height="1052.1365"
   id="rect3286" />

   transform=&quot;matrix(1,0,0,1,0,0)&quot;
</clipPath>

Attempting to release the clip in inkscape trunk results in a crash.

Steps to reproduce:
1) open LibreOffice Draw
2) draw a rectangle
3) export as EMF
4) open EMF in inkscape trunk
5) select the shape and release the clip

--> crash:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x000000010002937c in Inkscape::URIReference::getObject (this=0x1000000000000) at uri-references.h:79
79 SPObject *getObject() const { return _obj; }

The issue seems two-fold:
1) the EMF import creates an oddly format (or invalid?) transformation attribute stored as content instead of an attribute of the clip definition element<clip-path>
2) trunk fails to handle such a clip-path definition and crashes,

First encountered with r13165 on OS X 10.7.5.

Note:
Inkscape 0.48.4 doesn't crash (releasing the clip works as expected), but produces this message on the console:
** (inkscape:42805): CRITICAL **: void sp_item_write_transform(SPItem *, Inkscape::XML::Node *, const Geom::Matrix &, const Geom::Matrix *, bool): assertion 'SP_IS_ITEM(item)' failed