Inkscape should test invalid values in attributes

Bug #1169966 reported by Tamah Fridman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Krzysztof Kosinski

Bug Description

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

it is on linux open sesa

Tags: crash svg
Revision history for this message
Tamah Fridman (tama-fridman) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

reproduced on Windows 7, Inkscape 0.48.4, exit message is:

** (inkscape.exe:2988): WARNING **: SPObject::updateDisplay(SPCtx *ctx, unsigned int flags) : throw in ((SPObjectClass *) G_OBJECT_GET_CLASS(this))->update(this, ctx, flags);
terminate called after throwing an instance of 'Geom::ContinuityError'
  what(): lib2geom exception: Non-contiguous path (src/2geom/path.cpp:88)

reproduced on Windows XP, Inkscape rev 12260

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

the crash is apparently caused by elements of the following type:

<circle cx="NaN" cy="NaN" r="15"/>

these appear to be circles with an undefined centre position. After deleting them, 7 instances, the following file is obtained, which loads normally.

Revision history for this message
Tamah Fridman (tama-fridman) wrote : Re: [Bug 1169966] Re: inkscape crashes when attempting to open svg file

Thank you very much!

On Wed, Apr 17, 2013 at 2:41 PM, Alvin Penner <email address hidden> wrote:

> the crash is apparently caused by elements of the following type:
>
> <circle cx="NaN" cy="NaN" r="15"/>
>
> these appear to be circles with an undefined centre position. After
> deleting them, 7 instances, the following file is obtained, which loads
> normally.
>
> ** Attachment added: "target_new.svg"
>
> https://bugs.launchpad.net/inkscape/+bug/1169966/+attachment/3646783/+files/target_new.svg
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1169966
>
> Title:
> inkscape crashes when attempting to open svg file
>
> Status in Inkscape: A Vector Drawing Tool:
> Confirmed
>
> Bug description:
> with the following comment
> terminate called after throwing an instance of 'Geom::ContinuityError'
> what(): lib2geom exception: Non-contiguous path (2geom/path.cpp:88)
>
> it is on linux open sesa
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1169966/+subscriptions
>

jazzynico (jazzynico)
tags: added: crash svg
Revision history for this message
jazzynico (jazzynico) wrote : Re: inkscape crashes when attempting to open svg file

Not a real bug IMHO. The best we could do would be to properly test the SVG file before opening it.
Inkscape trunk already have a SVG output preference, with options to test and remove improper attributes when opening a file, but it doesn't seem work with the file from comment #1 (I'm not sure the attribute value is tested).

I suggest we mark the report as wishlist with "Inkscape should test attributes invalid values" as title.

Revision history for this message
Tamah Fridman (tama-fridman) wrote : Re: [Bug 1169966] Re: inkscape crashes when attempting to open svg file

Ok, thanks

The file was created in cobra toolbox, it was no error messages, full
impression of a valid picture. Also, some picture is being created when the
output is changes from svg to matlab.

On Sun, Apr 21, 2013 at 2:39 PM, JazzyNico <email address hidden>wrote:

> Not a real bug IMHO. The best we could do would be to properly test the
> SVG file before opening it.
> Inkscape trunk already have a SVG output preference, with options to test
> and remove improper attributes when opening a file, but it doesn't seem
> work with the file from comment #1 (I'm not sure the attribute value is
> tested).
>
> I suggest we mark the report as wishlist with "Inkscape should test
> attributes invalid values" as title.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1169966
>
> Title:
> inkscape crashes when attempting to open svg file
>
> Status in Inkscape: A Vector Drawing Tool:
> Confirmed
>
> Bug description:
> with the following comment
> terminate called after throwing an instance of 'Geom::ContinuityError'
> what(): lib2geom exception: Non-contiguous path (2geom/path.cpp:88)
>
> it is on linux open sesa
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1169966/+subscriptions
>

jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
importance: Undecided → Critical
importance: Critical → Wishlist
summary: - inkscape crashes when attempting to open svg file
+ Inkscape should test invalid values in attributes
Revision history for this message
Johan Engelen (johanengelen) wrote :

I think "wishlist" is perhaps too much of a downgrade for this bug? I think we should at least fix the crash that happens?

Revision history for this message
jazzynico (jazzynico) wrote :

My feeling was that documents created with Inkscape are valid, and that the bug only affects SVG files created with other tools, and thus the bug is in the SVG files, not in Inkscape.
But you're right, it's a bit harsh, and not testing invalid attributes can be considered as a bug in the application too.

Changed in inkscape:
importance: Wishlist → Medium
Revision history for this message
su_v (suv-lp) wrote :

No longer crashes with Inkscape 0.91+devel rev >= 14226 (2geom update), but does not render content visibly on canvas either, not even in outline view (this is probably almost conforming to the error processing as defined in the SVG 1.1 spec, though the content should be rendered up to but not including the invalid element). After deleting all 7 circles with 'nan' attribute values (found & selected via 'Edit > Find', case-insensitive search in attribute values), the remaining content renders as expected, AFAICT. Closing as 'Fix Committed' for now based on comment #7 (crash is "fixed", and it is possible to open as well as to edit the file within Inkscape, without resorting to external tools).

[1] http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing

Changed in inkscape:
assignee: nobody → Krzysztof Kosinski (tweenk)
milestone: none → 0.92
status: Triaged → Fix Committed
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
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.