Powerstroke LPE lib2geom error

Bug #986394 reported by AstromanPete
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Johan Engelen

Bug Description

I'm having some fun throwing script-generated SVG at the new Powerstroke live path-effect. It's worked like a champ until recently. I get the following error in the console, as many times as I have paths. It doesn't stop Inkscape from running, but the LPE doesn't render. The error is:

** (inkscape:17852): WARNING **: Exception during LPE [Unstable!] Power stroke execution.
 lib2geom exception: rx2 < 0, while computing 'rx' coefficient (2geom/ellipse.cpp:87)

I saw on the mailing list that extensive changes were recently made to the math of Powerstroke.

I've attached the SVG file, and a raster of the image when it worked below for your use.

I'm using Inkscape 0.48+devel r11266 (Apr 20 2012) on Kubuntu 11.10

Adding the new "linejoin_type" attribute to the effect definition yields the same result. This is not reflected in the attached SVG.

Thanks.

Revision history for this message
AstromanPete (peter-f-smith) wrote :
su_v (suv-lp)
tags: added: livepatheffects
removed: powerstroke
Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48+devel r11265 on OS X 10.7.2 (64bit).

Attaching reduced test case with one path extracted from the large test file (1.7 MB).

Other ways to reproduce:
1) switch to the pencil tool
2) reduce smoothness to a very low value
3) choose one of the 'Triangle' shapes (uses Powerstroke)
4) draw a curved path with the pencil (freehand) tool

-> powerstroke path effect often doesn't apply correctly, and produces the same error messages:

** (inkscape:99678): WARNING **: Exception during LPE [Unstable!] Power stroke execution.
 lib2geom exception: rx2 < 0, while computing 'rx' coefficient (../../src/2geom/ellipse.cpp:87)

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Johan Engelen (johanengelen)
Revision history for this message
su_v (suv-lp) wrote :

Attaching backtrace (full) from opening reduced test case with debug build of r11265 (breakpoint set to 'throw')

Revision history for this message
Johan Engelen (johanengelen) wrote :

fixed partly in r11295. the ellipse exception is caught now.
but another error pops up... working on it

Changed in inkscape:
status: Confirmed → In Progress
Revision history for this message
Johan Engelen (johanengelen) wrote :

while I wait for compilation:
Thank you very very very very much for testing Powerstroke so rigorously! Keep it going! :-)

Revision history for this message
Johan Engelen (johanengelen) wrote :

Now I get this exception when loading the test svg:

** (inkscape.exe:6520): WARNING **: Exception during LPE [Unstable!] Power stroke execution. lib2geom exception: Invariants violation (src/2geom/piecewise.h:144)

It is thrown somewhere in the reverse method of this line:
Piecewise<D2<SBasis> > mirrorpath = reverse(compose(pwd2_in,x) - y*compose(n,x));

Revision history for this message
Johan Engelen (johanengelen) wrote :

note: happens only for the "Linear" interpolator type

Revision history for this message
Johan Engelen (johanengelen) wrote :

Fixed in r11297.

Thanks again! :) Waiting for your next bug report ;-)

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
AstromanPete (peter-f-smith) wrote :

No, THANK YOU for working on such an awesome feature. To make my thanks more tangible, I kicked some money into the project.

su_v (suv-lp)
tags: added: 2geom
removed: lib2geom
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.