mchoe / SwiftSVG

A simple, performant, and lightweight SVG parser
Other
1.93k stars 230 forks source link

Fatal error: Index out of range #83

Open hassanmatc opened 6 years ago

hassanmatc commented 6 years ago

This line let point = self.pointForPathType(CGPoint(x: self.coordinateBuffer[0], y: self.coordinateBuffer[1]), relativeTo: path.currentPoint)

in file PathCommand, line 182 is causing this crash.

I've trying to load bunch of svgs in UITableView.

mchoe commented 6 years ago

@hassanmatc: Can you please post one of the svgs you're trying to parse?

hassanmatc commented 6 years ago

Trying to parse country flags provided here.

postolaki commented 6 years ago

here is an example of svg url that cause the exception

ammadakhtar commented 5 years ago

Has anyone found a work around to this bug? I am facing similar issue with the same endPoint url as mentioned.... it appears as if the white space in the svg image is whats causing the issue .... i have been able to download 3 images that didnt have any white space or color in them.... any update or work around to this would be helpful

magohamote commented 5 years ago

@ammadakhtar I am using the same API and instead of SwiftSVG I'm using SVGKit. With this library only this flag causes crashes so far.

BruceZhang2017 commented 3 years ago

we have same issue. @mchoe Can you help us ?