mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
475 stars 132 forks source link

Memory leak (and crash afterwards) in compose Mapbox #2174

Closed dryaz closed 11 months ago

dryaz commented 1 year ago

Environment

Observed behavior and steps to reproduce

Compose Mapbox crashes when try to hide/show and navigate with compose navigation approach (add composable based on some flag).

Steps to reproduce:

Expected behavior

No memory leak, no crash

Notes / preliminary analysis

CleanShot 2023-09-13 at 01 25 06@2x

Bitmaps are leaking. There were some issues in past when location provider causes memory leaks but it's not the case 'cause leaks happening also with disabled location.

Additional links and references

Dump from profiler: memory-20230913T011301.heapprofd.zip

dryaz commented 1 year ago

Possibly the same as https://github.com/mapbox/mapbox-maps-android/issues/2079

yunikkk commented 1 year ago

@dryaz thanks, we will check.

pengdev commented 12 months ago

Looks like an incorrect lifecycle handling issue for compose extension, I've created an internal ticket and will update when the fix is landed.

jush commented 11 months ago

This has been fixed in https://github.com/mapbox/mapbox-maps-android/releases/tag/v11.0.0-rc.2.