Repository navigation
Closed
Description
I haven't been able to reproduce this crash locally, however, we got reports on some crashes from Fabric.
Mapbox navigation version: v0.8.0
The crash log is the following
Crashed: com.apple.main-thread
0 MapboxNavigation 0x1037f87dc specialized NavigationMapView.shape(describing : Route, legIndex : Int?) -> MGLShape? (NavigationMapView.swift:243)
1 MapboxNavigation 0x1037fb33c specialized NavigationMapView.showRoute(Route, legIndex : Int?) -> () (NavigationMapView.swift:141)
2 MapboxNavigation 0x1037ed500 NavigationMapView.showRoute(Route, legIndex : Int?) -> () (NavigationMapView.swift)
3 XXXXX 0x102f85db8 specialized RouteViewController.(requestRoute(waypoints : [Waypoint], by : MBDirectionsProfileIdentifier) -> ()).(closure #1) (RouteViewController.swift:380)
4 XXXXX 0x102f85b88 partial apply for RouteViewController.(requestRoute(waypoints : [Waypoint], by : MBDirectionsProfileIdentifier) -> ()).(closure #1) (RouteViewController.swift)
5 MapboxDirections 0x10362df6c specialized Directions.(calculate(RouteOptions, completionHandler : ([Waypoint]?, [Route]?, NSError?) -> ()) -> URLSessionDataTask).(closure #1) (MBDirections.swift:179)
6 MapboxDirections 0x103627f98 partial apply for Directions.(calculate(RouteOptions, completionHandler : ([Waypoint]?, [Route]?, NSError?) -> ()) -> URLSessionDataTask).(closure #1) (MBDirections.swift)
7 libdispatch.dylib 0x180dc5088 _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x180dc5048 _dispatch_client_callout + 16
9 libdispatch.dylib 0x180dd1b74 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1016
10 CoreFoundation 0x1813e7f20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
11 CoreFoundation 0x1813e5afc __CFRunLoopRun + 2012
12 CoreFoundation 0x1813062d8 CFRunLoopRunSpecific + 436
13 GraphicsServices 0x183197f84 GSEventRunModal + 100
14 UIKit 0x18a8b3880 UIApplicationMain + 208
15 XXXXX 0x102f19ce0 main (main.m:22)
16 libdyld.dylib 0x180e2a56c start + 4
And seems to occur on this line:
| let destination = coordinates.suffix(from: previousLegCongestionIndex + 1) |
Metadata
Metadata
Assignees
Labels
No labels
Activity
bsudekum commentedon Oct 6, 2017
Does this happen constentaly? Or under specific conditions?
Sealos commentedon Oct 6, 2017
It's not a frequent crash. However, it happens when displaying a routing overview. We use NavigationMapView.showRoute(:) followed by NavigationMapView.showWaypoints(:)
This is the expected result that occurs when it doesn't crash. However, this doesn't crash locally.

bsudekum commentedon Oct 11, 2017
Fixed in #696
bsudekum commentedon Oct 11, 2017
Fixed in #696
Sealos commentedon Oct 13, 2017
I got a reproducible crash with these waypoints:
▿ 0 : <latitude: 59.33343; longitude: 18.03975>
▿ 1 : <latitude: 59.3389394819345; longitude: 18.0783550844132>
bsudekum commentedon Oct 13, 2017
Awesome. Will look into this with these waypoints and make sure the bandaid above is the right fix.