Inkscape crashes on the attached file, which is fine for Firefox

Bug #888559 reported by texnic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Alvin Penner

Bug Description

The attached file is generated with plot2svg in Matlab. It renders fine in Firefox 7. When trying to open it in Inkscape (any way: by opening, drag and dropping, or from the command line), Inkscape first reports "MS Visual C++ RT Library: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." and after pressing OK "Inkscape encountered an internal error and will close now."

Inkscape 0.48.2 r9819
Windows 7, 64 bit

Tags: crash
Revision history for this message
texnic (kotya-karapetyan) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Partially reproduced with Inkscape 0.48.2 and 0.48+devel r10735 on Mac OS X 10.5.8 (i386):
Inkscape does not crash, but hangs while trying to load the file (with huge memory consumption).

If canceled while hanging, gdb stops here (with stable 0.48.2):

Program received signal SIGINT, Interrupt.
0x0078204d in std::vector<Shape::sweep_src_data, std::allocator<Shape::sweep_src_data> >::_M_fill_insert ()
#1 0x0077bc93 in Shape::MakeSweepSrcData ()
#2 0x0079768e in Shape::ConvertToShape ()
(…)

tags: added: crash
Revision history for this message
su_v (suv-lp) wrote :

With stable Inkscape 0.48.2, the issue can be narrowed down to a single, huge polyline:

<g id="ID000020" clip-path="url(#ID000001)" >
      <polyline fill="none" stroke="#0000ff" stroke-width="0.5pt" stroke-dasharray="8.0pt,2.0pt" points="538.400,14643907.144 538.400,-153916.856 "/>
</g>

It's not the only polyline in the file that is larger than what Inkscape can display on the canvas when zoom out max (1%), but it seems that this one prevents Inkscape from loading the file.

Attached modified version of the file (only change: the polyline inside the group "ID000020" was deleted) opens fine in Inskcape 0.48.2 (on Mac OS X 10.5.8 (i386)).

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

Reduced test case (doesn't matter whether the path is clipped or not)

Revision history for this message
su_v (suv-lp) wrote :

With current trunk (r10735, optimized build), the modified version still doesn't load (based on the backtrace when interrupting it, this is due to the remaining huge stroked paths and the known performance regression due to the more precise bounding box calculation of stroked objects).

Revision history for this message
su_v (suv-lp) wrote :

Backtrace from Inkscape 0.48+devel r10735 after interrupting the loading of the modified version ('888559-pic-reduced-11.svg'):
AFAICT this is different from the originally reported issue (trunk appears to hang while calculating the (visual) bounding box of the remaining (partially huge) paths, e.g.:

polyline with 1054 points:
<g id="ID000005" clip-path="url(#ID000001)" >
      <polyline fill="none" stroke="#7f7fff" stroke-width="6.0pt" stroke-dasharray="none" points="-2558.373,6936707.144 (…) -1442.490,227.157 "/><g></g></g>

polyline with 1282 points:
<g id="ID000007" clip-path="url(#ID000001)" >
      <polyline fill="none" stroke="#ff7f7f" stroke-width="3.0pt" stroke-dasharray="none" points="-2559.198,6936707.144 (…) 1902.400,-50375.564 "/><g></g></g>

polyline with 554 points:
<g id="ID000015" clip-path="url(#ID000001)" >
      <polyline fill="none" stroke="#4c0000" stroke-width="2.0pt" stroke-dasharray="none" points="-1865.145,227.133 (…) 2398.400,-54082.866 "/><g></g></g>

Revision history for this message
Mc (mc...) wrote :

No crash observed with 0.91 or trunk here

Revision history for this message
jazzynico (jazzynico) wrote :

Fix confirmed with 0.91.
Crash reproduced with 0.48.5, but not with 0.91 and trunk rev. 14332, on Windows XP (32bit).

Changed in inkscape:
milestone: none → 0.91
status: Confirmed → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

Hang on load (with excessively increasing memory usage btw) as described in comments 2, 5, 6 not reproduced with Inkscape 0.91 r13725 and 0.91+devel r14332 on OS X 10.7.5: the original file as well as the reduced test case open ok.

Based on tests with archived builds:
- reproduced with 0.48+devel rev <= 11009,
- not reproduced with 0.48+devel rev >= 11010;
the remaining issue had been fixed with the changes in revision 11010:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/11010

Closing as 'Fix Released' with milestone 0.91.

Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.