Skip to content

Crash when the SVG width/height is set to auto #772

Description

@arturdev

New Issue Checklist

  • I have read and understood the CONTRIBUTING guide
  • I have reproduced the problem while running in Xcode, and read the Console log, and acted upon any relevant error or warning messages
  • I have reproduced the problem while running in Xcode's Debugger, and used breakpoints to examine the actual values of variables vs the expected values
  • I am not using CocoaPods, or: I am using CocoaPods, but have verified my podspec points to SVGKit v2.x

Issue Description and Steps

In some cases when the SVG's width/height is set to auto the app crashes: example svg

*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
I've found that if in CSSPrimitiveValue.m in the case of the unhandled CSS_STRING I return a non-zero value (f.e. 600) the app works correctly and SVG is rendered correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions