Open edopelawi opened 6 years ago
Hi,
I have a similar issue, my SVG parsing crashes at line 355 in PathCommand.swift
let point = self.pointForPathType(CGPoint(x: self.coordinateBuffer[2], y: self.coordinateBuffer[3]), relativeTo: path.currentPoint)
My usage of the library is similar to @edopelawi s. I have also tried adding it as a UIView
extension, which ended with a similar result.
I also nee to mention, that, the example SVG works fine in every scenario, so the crash might has to do something with the svg format.
I don't know much about SVG parsing, but I have found the "problem" in my svg file. There was a missing close path Z
, in the last command. Adding it fixed only the crash, the rendered image is nowhere near the original.
Dear all,
I'm currently using SwiftSVG v2.1.5, installed through Carthage. I added SVGView to my XIB, and tried to load an SVG asset:
And the
insurance.svg
asset contains this:When I run the code in Xcode 9.4's Simulator (iPhone 5S, 11.4), I got a crash in PathCommand.swift, line 326. I can't trace it further since the framework was compiled with optimization. Here's the method that contains line 326 in PathCommand.swift:
Any help would be appreciated! :)