
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.
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:noneas 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 saysstroke-dasharray:nonemeans "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.