Started getting this error on Beta 5, while drawing a path taken from a user gesture.
Doesn't always happen, never had this problem on iOS 13 or even Beta 3. (did not try 4).
The position is not NaN, same code works on Beta 3
** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]. Layer: <TtC7SwiftUIP33F176A6CF4451B27508D54E2BEAEBFD5415ColorShapeLayer:0x6000033efa80; position = CGPoint (0 0); bounds = CGRect (0 0; 0 0); delegate = <TtC7SwiftUIP33A34643117F00277B93DEBAB70EC0697122UIShapeHitTestingView: 0x7fa7c4e1f2c0; frame = (0 0; 0 0); anchorPoint = (0, 0); autoresizesSubviews = NO; layer = <TtC7SwiftUIP33_F176A6CF4451B27508D54E2BEAEBFD5415ColorShapeLayer: 0x6000033efa80>>; allowsEdgeAntialiasing = YES; allowsGroupOpacity = YES; anchorPoint = CGPoint (0 0); lineDashPattern = ( ); lineWidth = 3; strokeColor = <CGColor 0x6000017b9fe0> [<CGColorSpace 0x600001795b00> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1; extended range)] ( 0 0 0 1 ); fillColor = <CGColor 0x6000017ba100> [<CGColorSpace 0x600001795b00> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1; extended range)] ( 0 0 0 0 ); path = <CGPath 0x60000018cab0>>'
terminating with uncaught exception of type NSException
CoreSimulator 732.13 - Device: iPhone 8 (14A5AC85-61B7-414B-A5D9-7118D1079B64) - Runtime: iOS 14.0 (18A5351d) - DeviceType: iPhone 8
Any ideas?
Cheers
Error - https://developer.apple.com/forums/content/attachment/fbcdb285-e336-44e0-be2d-160cef83cbe2