SwiftSVG icon indicating copy to clipboard operation
SwiftSVG copied to clipboard

Fatal error: Index out of range

Open hassanmatc opened this issue 6 years ago • 6 comments

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.

hassanmatc avatar Mar 06 '18 19:03 hassanmatc

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

mchoe avatar Mar 07 '18 02:03 mchoe

Trying to parse country flags provided here.

hassanmatc avatar Mar 07 '18 06:03 hassanmatc

here is an example of svg url that cause the exception

postolaki avatar Mar 21 '18 18:03 postolaki

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

ammadakhtar avatar Nov 05 '18 20:11 ammadakhtar

@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.

magohamote avatar Jan 26 '19 20:01 magohamote

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

BruceZhang2017 avatar Jul 22 '21 03:07 BruceZhang2017