Closed swathysreenivas closed 1 week ago
Getting a similar issue,
E/Mapbox: [maps-android\Mbgl-Style]: Mapbox SDK memory leak detected! Style object (accessing setStyleLayerProperty) should not be stored and used after MapView is destroyed or a new style has been loaded.
E/Mapbox: [maps-android\Mbgl-Style]: Mapbox SDK memory leak detected! Style object (accessing styleLayerExists) should not be stored and used after MapView is destroyed or a new style has been loaded.
My guess is, styleLayer is not being destroyed along with the map
Edit:
I just realized the error goes away when I remove the UserLocation Puck. It seems that the setStyle is not disabled somehow?
@IsaacTrevino, @swathysreenivas are you able to reproduce this issue on our most recent SDK, v10.9.0?
@ZiZasaurus
Yes, I have just finished testing it with 10.9.0
and the bug persists.
I have narrowed down where the call may be coming from: plugin/locationcomponent/LocationLayerWrapper.kt
Stale, outdated. Reproducible example will be appreciated if this is still the case with latest version of the SDK.
Environment
Observed behavior and steps to reproduce
Integrated map SDK and react native bridging done. Unfortunately, the app got stuck and got an error as Mapbox SDK memory leak detected!
Expected behavior
Map view with navigation should be displayed
Notes / preliminary analysis
It was working fine when placed as an initial screen. Error got when used as an inner component of another view.
Additional links and references