Powerstroke infinite loop

Bug #1535444 reported by Liam P. White on 2016-01-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Open the attached file.
- opening via CLI will hang inkscape before the GUI loads
- opening via file picker will hang the file picker if "Enable Preview" is checked
- opening via file picker if preview is not enabled will hang the GUI

Thread backtraces (taken by capturing the backtrace from gdb when interrupting the program) suggest that the problem is in 2geom:
#7 SBasis (this=0x7fffffffcc00) at ../../src/2geom/sbasis.h:112
#8 divide_by_sk (a=..., k=1) at ../../src/2geom/sbasis-geometric.cpp:57
#9 0x0000000000c62e06 in RescaleForNonVanishingEnds (MM=..., ZERO=0.0001) at ../../src/2geom/sbasis-geometric.cpp:109
#10 0x0000000000c64458 in Geom::unitVector (V_in=..., tol=tol@entry=0.01, order=order@entry=3) at ../../src/2geom/sbasis-geometric.cpp:229
#11 0x0000000000c659b7 in Geom::unitVector (V=..., tol=tol@entry=0.01, order=order@entry=3) at ../../src/2geom/sbasis-geometric.cpp:311
#12 0x00000000007b8f12 in Inkscape::LivePathEffect::LPEPowerStroke::doEffect_path (this=0x2b217a0, path_in=...) at ../../src/live_effects/lpe-powerstroke.cpp:573

- not reproduced with trunk rev <= 14265
- reproduced with trunk rev >= 14355
(no in-between builds available)

Liam P. White (liampwhite) wrote :
description: updated
su_v (suv-lp) on 2016-01-18
tags: added: regression
Changed in inkscape:
milestone: none → 0.92
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.91+devel r14608 on OS X 10.7.5.

Based on tests with archived builds:
- not reproduced with rev <= 14293,
- reproduced with rev >= 14299;
the regression could be related to the 2geom update in rev 14299.

* Changelog:

* Revision 14299:
2Geom: update to r2422.
Fixes LP #1482806: crash on Pattern along Path with horizontal segments.

Possibly related earlier report:
* Bug #1515993 “Hang with CubicBezierSmooth powerstroke interpolator”
The reduced test case here (bug #1535444) uses 'Linear' interpolator though, not 'CubicBezierSmooth'.

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
tags: added: 2geom
Jabiertxof (jabiertxof) on 2016-06-05
Changed in inkscape:
assignee: nobody → Jabiertxof (jabiertxof)
Jabiertxof (jabiertxof) wrote :

This patch fix the bug, anyway still freeze because broken SVG on smarting, the same original-d with a full Power Stroke LPE whith the same values + missing ones, render without freeze.
Also fix a bug pointed by suv aplying over a big ellipse a power stroke, no know bug reported.
Also fix bug: #1236320
Also Fix -not sure why but currently dont happens 1586973
This patch need backtrace to 2GEOM

Jabiertxof (jabiertxof) wrote :

Also fix noumerus bugs, and simplifique the code with pen tool triangle in/out specialy on close paths

Jabiertxof (jabiertxof) wrote :

Sorry for mix some bugs, but the solution to all become working on all and mayority of the fix is based on the 2GEOM changes

Jabiertxof (jabiertxof) wrote :

The fix remove hangs on the function RescaleForNonVanishingEnds from sbasis-geometric and is used by unitVector and atan2 in piecewise, so maybe remove more hangs :)

su_v (suv-lp) wrote :

Jabiertxof wrote 1 hour ago:
> Also fix a bug pointed by suv aplying over a big ellipse a power
> stroke, no know bug reported.

Fix with proposed patch for this particular crash confirmed - no more crashes with r14955 + patch when applying Powerstroke LPE to ellipse/circle directly (without manually converting to path first).

jazzynico (jazzynico) on 2016-06-05
Changed in inkscape:
status: Confirmed → In Progress
Jabiertxof (jabiertxof) wrote :

Is ok the patch to push into trunk?

Jabiertxof (jabiertxof) wrote :

The 2Gemo code is merged onto 2Geom by Krzysztof. If nobody object it, I merge the patch into trunk tonight.

Jabiertxof (jabiertxof) wrote :

Fixed in r.14991

Changed in inkscape:
status: In Progress → Fix Committed
Bryce Harrington (bryce) on 2017-01-10
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers