Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API #16

Open
umangbista2 opened this issue Jul 20, 2021 · 1 comment

Comments

@umangbista2
Copy link

Thank you Cred team for providing such good tool to integrate this design language into the apps.
However, I'm facing one issue(multiple warnings):

Debug log with Symbolic Break-point with 'CGPostError'

2021-07-20 18:35:04.031207+0530 project-name[73468:1956602] [Unknown process name] Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.
(lldb) po transform
▿ CGAffineTransform
  - a : 0.9758454106280193
  - b : 0.0
  - c : nan
  - d : -inf
  - tx : 5.0
  - ty : 5.0

At file: NewHelper.swift

        var transform = CGAffineTransform(translationX: borderWidth/2.0, y: borderWidth / 2.0)
        transform = transform.scaledBy(x: (bounds.width - borderWidth) / bounds.width,
                                       y: (bounds.height - borderWidth) / bounds.height)
        let cgPath = curvedPath.cgPath.copy(using: &transform)

How can this be avoided

@EatDinner
Copy link

I'm facing same issue, too.
Is there any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants