crash when scaling a circle, document units = 'm'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
High
|
Alvin Penner | ||
lib2geom |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
this is a re-issue of a bug previously noted in Bug 1244861, comment 5.
- Windows XP, Inkscape 13288
- in Document Properties, set default document units to 'm'.
- draw a circle, set the diameter to 0.007 m.
- execute Path->Object to Path, to convert it to arcs.
- save as circle007.svg, attached here
- zoom in, to about 500%
- while holding down Ctrl, grab a corner and decrease radius slightly
- when the diameter is about .006 or .005, note that the circle becomes a 'diamond' or 'square', after releasing the mouse
- while holding down Ctrl, grab a corner and try to increase the radius again
- get a crash with the following console output:
terminate called after throwing an instance of 'Geom::
what(): lib2geom exception: Non-contiguous path (src/2geom/
(the crash is easy to reproduce, the specific console message does not always appear, maybe shows up half the time)
Related branches
Changed in inkscape: | |
status: | Confirmed → Triaged |
re-posting a proposed solution from Bug 1244861, comment 7
This can be fixed in the file 2geom\ellipse.cpp, routine Ellipse: :transformed, line 236. std::sqrt( AM.det( )), 0) )
replace the line:
if ( are_near(AM.det(), 0) )
with the line:
if ( are_near(
This line is used to bypass the normal processing of a circle if the object is too small. The determinant is used to measure the size of the object. Unfortunately, the determinant is a quadratic function of the radius, when the size measurement should be a linear function of radius, so it approaches zero more rapidly than desired at small radius. Taking the square root avoids the problem.
Unfortunately, this is in 2geom, so I am reluctant to commit this change, thought I would ask for comment here, from anyone who is more familiar with 2geom.