Regression problems on closed Spiro (rev >= 14226)

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

Bug Description

Not sure when, maybe in last 2Geom Sync,we have problems on closed paths with spiro:
1 problem: SpiroLive crash when close path backtrace: https://inkscape.org/en/gallery/item/6231/
2 problem: Apply spiro to a closed path, no crash but not work and log:
** (inkscape:4167): WARNING **: Exception during LPE Spiro spline execution.
 lib2geom exception: Non-contiguous path (../../trunk/src/2geom/path.cpp:990)

Jabiertxof (jabiertxof)
description: updated
su_v (suv-lp)
tags: added: livepatheffects
removed: lpe spiro spirolive
Revision history for this message
su_v (suv-lp) wrote :

Please add information about Inkscape build (at least the revision number) to the bug report.

Changed in inkscape:
status: New → Incomplete
Revision history for this message
su_v (suv-lp) wrote :

Attaching externally hosted backtrace to the bug report (external links tend to expire or get removed over time).

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

On OS X 10.7.5 (using archived builds as well as latest trunk r14241):

1) crash when closing spirolive path:
- not reproduced with Inkscape 0.91+devel rev <= 14224,
- reproduced with Inkscape 0.91+devel rev >= 14228;
very likely a regression introduced with the 2geom update in rev 14226:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14226

2) dysfunctional spiro path effect when applied to closed path:
- not reproduced with Inkscape 0.91+devel rev <= 14224,
- reproduced with Inkscape 0.91+devel rev >= 14228;
very likely a regression introduced with the 2geom update in rev 14226:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14226

Changed in inkscape:
importance: Undecided → High
milestone: none → 0.92
status: Incomplete → Confirmed
tags: added: regression
summary: - Regression problems on closed Spiro
+ Regression problems on closed Spiro (rev >= 14226)
tags: added: 2geom
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

This problem can be fixed by calling setStitching(true) on the affected path.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Hi Krzysztof thanks with your help. I try to fix but no luky :(
Spiro code is so complex to me, I try to make some Stitching changing originals curves to paths to allow add stitching but no works.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Does r14250 fix the problem?

Revision history for this message
Jabiertxof (jabiertxof) wrote :

No this not fix the bug. the same backtrace.
../../trunk/src/2geom/path.cpp:987 no check for stiching value, could be this?

Revision history for this message
Alvin Penner (apenner) wrote :

attached is a proposed patch for this bug.

in the original code, if the spiro path was closed, the code would add a 'close path' command immediately after the first 'move to' command, which caused a discontinuity. In the new code, the 'close path' command is postponed until after the last segment is drawn.

Any testing would be welcome.

Revision history for this message
Jabiertxof (jabiertxof) wrote : Re: [Bug 1473641] Re: Regression problems on closed Spiro (rev >= 14226)

Thanks Alvin for the patch, I try it tonight!!!

On vie, 2015-08-07 at 13:37 +0000, Alvin Penner wrote:
> attached is a proposed patch for this bug.
>
> in the original code, if the spiro path was closed, the code would add a
> 'close path' command immediately after the first 'move to' command,
> which caused a discontinuity. In the new code, the 'close path' command
> is postponed until after the last segment is drawn.
>
> Any testing would be welcome.
>
> ** Patch added: "spiro_seg.diff"
> https://bugs.launchpad.net/inkscape/+bug/1473641/+attachment/4441060/+files/spiro_seg.diff
>

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Hi Alvin tested and go very well, no console wrong output and work as expected. The code show great! ¿Is too much hard fix this bug? I try to fix previously but no luck :(
Thanks for the patch!

Revision history for this message
Alvin Penner (apenner) wrote :

glad to hear it is working. The problem is not really coming from 2geom, it is isolated to just the spiro code, but it was accidentally exposed when the definition of continuity in the routine Path::do_append was slightly changed.

in any event, I will wait for a day or so, and if no other comments show up, or no problems are encountered, then I'll commit the change. Thanks for testing!

Revision history for this message
Jabiertxof (jabiertxof) wrote :

You are welcome!

Revision history for this message
Alvin Penner (apenner) wrote :

fix committed to rev 14285

Changed in inkscape:
status: Confirmed → Fix Released
assignee: nobody → Alvin Penner (apenner)
su_v (suv-lp)
Changed in inkscape:
milestone: 0.92 → none
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.