mapbox / mapbox/mapbox-navigation-android
Low memory conditions not handled.
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
**Android API:**
**Mapbox Navigation SDK version:**
MapboxNavigation.onDestroy() is not called during low memory conditions. As a result, resources are not released and, if navigation is in progress, it is not terminated. This causes indeterministic behavior of the app.
The root cause is that the Android OS does not guaranty a call to onDestroy() during low memory conditions. When the app is backgrounded, onDestroy() is not called, but onCreate() is called when the app is foregrounded. The SDK expects onDestroy()/onCreate() calls to be paired.
### Steps to trigger behavior
1. Using the emulator create a device with low initial memory
2. Start the Android demo App, or any other app that uses the SDK in that emulator
3. Start navigation and background/foreground the app.
### Expected behavior
The navigation session should continue
### Actual behavior
The App will either crash, display a black screen or enter some other indeterminate state.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the low-memory emulator scenario with the Android demo app and reviewing the MapboxNavigation.onDestroy()/onCreate() lifecycle handling described in the issue. Confirm how backgrounding affects an active navigation session; done means the session continues without a crash, black screen, or indeterminate state and resources are handled correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100