Skip to content

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

@umangbista2

Description

@umangbista2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions