Skip to content

Crash when showing route #691

Closed
Closed

Description

@Sealos

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)

Activity

  1. bsudekum commented on Oct 6, 2017

    @bsudekum
    Contributor

    Does this happen constentaly? Or under specific conditions?

  2. Sealos commented on Oct 6, 2017

    @Sealos
    ContributorAuthor

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

  3. bsudekum commented on Oct 11, 2017

    @bsudekum
    Contributor

    Fixed in #696

  4. bsudekum commented on Oct 11, 2017

    @bsudekum
    Contributor

    Fixed in #696

  5. Sealos commented on Oct 13, 2017

    @Sealos
    ContributorAuthor

    I got a reproducible crash with these waypoints:
    ▿ 0 : <latitude: 59.33343; longitude: 18.03975>
    ▿ 1 : <latitude: 59.3389394819345; longitude: 18.0783550844132>

  6. bsudekum commented on Oct 13, 2017

    @bsudekum
    Contributor

    Awesome. Will look into this with these waypoints and make sure the bandaid above is the right fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions