My application was working fine on iOS6 but it is crashing on iOS 7 due to bad access when I add overlay to MKMapView.My code is as follows
MKPolyline *polyl
I had the same problem, the stack trace looks misleading to me. My bugfix is to explicitely add the overlay on the main thread:
dispatch_async(dispatch_get_main_queue(), ^{
[mapView addOverlay:myRouteLine];
});
or if you'd like to use the new MKOverlayRenderer:
dispatch_async(dispatch_get_main_queue(), ^{
[mapView addOverlay:myRouteLine level:MKOverlayLevelAboveRoads];
});
In my case, I'm downloading asynchronously some data, generate Polylines, create MKOverlayViews / MKOverlayRenderes (didn't help to replace the deprecated code) and add the overlay to the map.