Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low memory conditions not handled. #2065

Open
olegzil opened this issue Sep 26, 2019 · 1 comment
Open

Low memory conditions not handled. #2065

olegzil opened this issue Sep 26, 2019 · 1 comment
Labels
bug Defect to be fixed.

Comments

@olegzil
Copy link
Contributor

olegzil commented Sep 26, 2019

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.

@Guardiola31337
Copy link
Contributor

Refs. #2255

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

No branches or pull requests

4 participants