You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm on diagrams-lib 1.3.0.9 (Ubuntu Trusty 64bit). Using ghci (ghc version 7.10.2).
When trying to produce an offset from a bézier segment for which the first control point is identical to the first end point (i.e. in the function bezier3 c1 c2 x, using (V2 0.0 0.0) as c1), I get in an "infinite loop" at runtime, resulting in a stack overflow.
In the code below, replacing c1 by (V2 0.0 0.0), instead of (V2 0.0 1.0) for example, produces a run-time error when running main.
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
importDiagrams.Backend.SVGimportDiagrams.PreludeimportDiagrams.TwoD.Offset (offsetTrail)
x2 = r2 (1.0,1.0) ::V2Double-- endpoint-- this works well
[c1,c2] =map r2 [(0.0, 1.0), (1.0, 0.0)] -- control points-- this creates a run-time error (comment-out line 13, and uncomment line 16 to check).-- [c1,c2] = map r2 [(0.0, 1.0), (1.0, 0.0)] -- control points
t = fromSegments [bézier3 c1 c2 x2]
t' = (strokeLocTrail $ offsetTrail 0.5 t) # lc orange # lw thick
out = t <> t' # showOrigin
main =dolet fp ="./mySVG.svg"
dims = mkSizeSpec2D (Just (500)) (Just (500))
renderSVG fp dims (out ::DiagramB)
The text was updated successfully, but these errors were encountered:
Thanks for the report! A stack overflow is definitely a bug. I suppose @fryguybob will have to take a look at this, though I think he is deep in paper-writing mode at the moment.
I'm on diagrams-lib 1.3.0.9 (Ubuntu Trusty 64bit). Using ghci (ghc version 7.10.2).
When trying to produce an offset from a bézier segment for which the first control point is identical to the first end point (i.e. in the function
bezier3 c1 c2 x
, using (V2 0.0 0.0) as c1), I get in an "infinite loop" at runtime, resulting in a stack overflow.In the code below, replacing c1 by (V2 0.0 0.0), instead of (V2 0.0 1.0) for example, produces a run-time error when running
main
.The text was updated successfully, but these errors were encountered: