Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[android] Animating camera with tilt and map padding set couses big memory leaks in nativeCode leading to OOM #15411

Closed
2Rec opened this issue Aug 19, 2019 · 2 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@2Rec
Copy link

2Rec commented Aug 19, 2019

Animating camera with tilt and map padding set couses big memory leaks in nativeCode.

Steps to reproduce. Profiler from Android Studio shows huge memory usage. 1 minute -> from 120MB to over 500MB in native code.

  1. Set Map padding for example map.setPadding(0, 1000, 0, 0)
  2. Constantly updating one after another cameraPosition
    map.easeCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 1000, false)

Expected behavior

No leaks, no crashes, smooth movement

Actual behavior

  • Memory leaks, OOM crash

Configuration

Android versions: 8.0.0
Device models: HTC U11
Mapbox SDK versions: 8.2.1

@astojilj
Copy link
Contributor

astojilj commented Aug 19, 2019

Addressed with #15195.

map.setPadding(0, 1000, 0, 0)

Note that setPadding uses logical view coordinates, not physical: and 1000 will most likely move the center of your screen way under the bottom of the screen.

@LukasPaczos LukasPaczos added the Android Mapbox Maps SDK for Android label Aug 19, 2019
@LukasPaczos
Copy link
Contributor

Closing as resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

3 participants