Skip to content

Hang caused by stroke-dash array:none #82

@jake-b

Description

@jake-b

Image

I am trying SVGView in a project, and found that the following SVG causes a crash/infinite loop/pinwheel hang.

My AI helper churned for a while and identified stroke​-dasharray​:none as the culprit. The SVG style is parsed by SVGView as [0​.0] (a zero-length dash pattern). When CoreGraphics tries to render this, it infinite-loops trying to tile zero-length dashes across the path. The AI tell me that SVG spec says stroke​-dasharray​:none means "solid line" (empty array), not [0].

I added some code to sanitize the SVG before being passed to SVGView in my app, but I offer this in case it helps someone else.

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