willdale/SwiftUICharts

Invalid frame dimension (negative or non-finite)

AvdLee opened this issue · 0 comments

See:

CleanShot 2022-08-11 at 16 13 36@2x

Xcode 14 shows these as purple warnings, whereas Xcode 13 only shows them as system logs.

The affected method:

CleanShot 2022-08-11 at 16 14 10@2x

(lldb) po totalHeight
96.0

(lldb) po value
-97134000.0

(lldb) po maxValue
149426000.0

(lldb) po divideByZeroProtection(CGFloat.self, value, maxValue)
-0.6500475151580046

(lldb) po totalHeight * divideByZeroProtection(CGFloat.self, value, maxValue)
-62.40456145516845

It starts with this method:

CleanShot 2022-08-11 at 16 15 51@2x