Crashes due to "Non-contiguous path"

Bug #1545489 reported by Patrick Storz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lib2geom
In Progress
High
Liam P. White

Bug Description

This is a follow-up to https://bugs.launchpad.net/inkscape/+bug/1492153 (CDR import crashes after lib2geom update (rev >= 14226))

Inkscape crashed with the following error
   terminate called after throwing an instance of 'Geom::ContinuityError'
    what(): lib2geom exception: Non-contiguous path (src/2geom/path.cpp:987)

This was due to the imported path containing two consecutive "closepath" commands, i.e. "Z\nZ"

The SVG spec is unclear whether this is valid; If it is 2geom should not choke on it.

Revision history for this message
Patrick Storz (ede123) wrote :

Note that I committed a workaround for the Inkscape CDR import in http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14650 so this is not a high priority with respect to that particular bug.

Revision history for this message
Patrick Storz (ede123) wrote :

~suv just found a way to trigger the same crash directly in Inkscape when manipulating a path in the XML editor:

> Additional hints to reproduce the crash: draw a new compound path
> (with two sub-paths), and make sure that the second sub-path path
> (verify order in node tool by stepping through nodes with <TAB>) has
> more than two nodes (it does not appear to make a difference whether
> the nodes have extracted node handles or not). Insert the consecutive
> 'Z' (or 'z') commands in the XML editor before the 'M' (or 'm')
> command defining the second sub-path.

Crashes with the following error in Inkscape r14651 trunk build on Windows 7:
    (inkscape.exe:3844): glibmm-ERROR **:
    unhandled exception (type std::exception) in signal handler:
    what: lib2geom exception: Non-contiguous path (src/2geom/path.cpp:1043)

So it seems this issue could also emerge in other scenarios.

Revision history for this message
Liam P. White (liampwhite) wrote :

Based on the backtrace attached in the original report, this fix looks trivial and I will attempt it when I am home.

Revision history for this message
Liam P. White (liampwhite) wrote :

A fix for 2geom has been pushed to github now in commit 143bbcf76a89ff1666143ff065a10390495425f7, could someone sync the Launchpad copy and merge the changes to Inkscape?

Changed in lib2geom:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Liam P. White (inkscapebrony)
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.