Thursday 15 May 2014

ios - App crashes when I use my own .csv file to draw a polyline -


I want to draw a route on the map taking coordinates from a CSV file. I have created two sample codes (from The Rinkt Blogger) and they worked fine with the original CSV files, but when I used a converted GPX file in CSV (GPSBaffleFeafing), the app crashes with the following error:

2013-06-21 02: 46: 10.606 OS 4 Maps [10178: 907] * Cancel the app due to the exception of an exception 'NSRAN expansion', reason: ' * - [__NASII ObjectItIndia Bus]: Index 1 beyond the range [0 .. 0] ' * First throw the call stack: (0x31bbb3e7 0x398b6963 0x31b0621d 0x484af 0x48151 0x339e9579 0x47e81 0x33a2aaa1 0x33a2a625 0x33a22833 0x339cad1f 0x339ca7ad 0x339ca1ef 0x356e25f7 0x356e2227 0x31b903e7 0x31b9038b 0x31b8f20f 0x31b0223d 0x31b020c9 0x33a2146d 0x33a1e2b9 0x47dfd 0x39ce3b20) libc ++ abi.dylib: Finish is called an exception (LL.DB)

Does anyone know why this is happening?

I have checked the file and it is not empty and, in my opinion, okay.

The latest sample is and is the modified CSV file.

Thank you!

What is this point in your code? Have you tried setting a breakpoint?

With the linked code, you have three versions of objectAtIndex: for-loop. First one should be OK, but you can assume that [latLonArr count] == ​​2 :

  NSArray * latLonArr = [Selected from existing pointing components Gone batchworks inset: [NSCRCTSAT characterWithSourceAuthentication: @ ""]]; Insert ([latLonArr count] == ​​2); CLLocationDegrees Latitude = [[latLonArr ObjectOctInx: 0] Double Value]; CLLocationDegrees Longitude = [[latLonArr ObjectOctInx: 1] Double Value];    

No comments:

Post a Comment