Skip to content

Crash: RerouteController deinit (SIGABRT) on navigator restart from a stale offline nav-tile region #4841

Description

@spatialmonkey-bot

Summary

The app crashes (EXC_CRASH / SIGABRT) inside RerouteController.__deallocating_deinit,
reached from MapboxNavigator.fallbackToOffline(_:), when the router switches
online→offline mid-trip. With the default routingProviderSource = .hybrid, this
fires intermittently on spotty cellular connectivity a few seconds into active guidance.

Environment

  • mapbox-navigation-ios: v3.25.1 (MapboxNavigationCore)
  • iOS 26 (device: iPhone 17), Xcode 26 / Swift 6, strict concurrency = complete
  • Debug build on a physical device

Crash (symbolicated, main thread)

abort()
swift::fatalErrorv(...)
swift_deallocClassInstance.cold.1
swift_deallocClassInstance
RerouteController.__deallocating_deinit
swift_release_dealloc
closure #1 in MapboxNavigator.fallbackToOffline(:)

RerouteController.deinit calls navigator?.removeRerouteObserver(for: self); the
release happens inside the Task { @MainActor … } in fallbackToOffline, which
reassigns rerouteController = configuration.navigator.rerouteController, deallocating
the previous instance.

Steps to reproduce

  1. Use default CoreConfig (i.e. RoutingConfig.routingProviderSource == .hybrid).
  2. Start active guidance.
  3. Drive/test in an area with intermittent connectivity so the SDK toggles
    online↔offline (navigationDidSwitchToFallbackVersion).
  4. App aborts within a few seconds, in the reroute-controller teardown.

Expected

Switching between online and offline routing should not crash.

Actual

fatalError during RerouteController deallocation → SIGABRT.

Workaround

Setting routingConfig: RoutingConfig(routingProviderSource: .online) avoids the
fallback path and the crash at the cost of offline routing.

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