mapbox / mapbox/mapbox-maps-android
ANR occurs when calling PointAnnotationManager.delete
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Android OS version:all
- Devices affected:all
- Maps SDK Version:10.18.3
## Observed behavior and steps to reproduce
ANR occurs when calling PointAnnotationManager.delete
## Expected behavior
No ANR
## Notes / preliminary analysis
at java.nio.HeapByteBuffer.(HeapByteBuffer.java:87)
at java.nio.HeapByteBuffer.(HeapByteBuffer.java:71)
at java.nio.ByteBuffer.allocate(ByteBuffer.java:380)
at com.mapbox.maps.extension.style.image.ImageExtensionImpl$Builder.bitmap(ImageExtensionImpl.java:96)
at com.mapbox.maps.plugin.annotation.AnnotationManagerImpl$addIconToStyle$2$1$1$imagePlugin$1.invoke(AnnotationManagerImpl.java:456)
at com.mapbox.maps.plugin.annotation.AnnotationManagerImpl$addIconToStyle$2$1$1$imagePlugin$1.invoke(AnnotationManagerImpl.java:455)
at com.mapbox.maps.extension.style.image.ImageUtils.image(ImageUtils.java:12)
at com.mapbox.maps.plugin.annotation.AnnotationManagerImpl.addIconToStyle(AnnotationManagerImpl.java:455)
at com.mapbox.maps.plugin.annotation.AnnotationManagerImpl$updateSource$1.invoke(AnnotationManagerImpl.java:438)
at com.mapbox.maps.plugin.annotation.AnnotationManagerImpl$updateSource$1.invoke(AnnotationManagerImpl.java:428)
at com.mapbox.maps.plugin.MapDelegateProviderImpl.getStyle$lambda-0(MapDelegateProviderImpl.java:21)
at com.mapbox.maps.plugin.MapDelegateProviderImpl.$r8$lambda$prB63jRkHNgIjSUbBTljg7oBEc8(MapDelegateProviderImpl.java:0)
at com.mapbox.maps.plugin.MapDelegateProviderImpl$$InternalSyntheticLambda$0$ad7b39f6bb44fc1068a08e91fe6a3a4e4493ca01d9ce91ee2243188dda026e07$0.onStyleLoaded(MapDelegateProviderImpl.java:2)
at com.mapbox.maps.MapboxMap.getStyle(MapboxMap.java:360)
at com.mapbox.maps.plugin.MapDelegateProviderImpl.getStyle(MapDelegateProviderImpl.java:21)
at com.mapbox.maps.plugin.annotation.AnnotationManagerImpl.updateSource(AnnotationManagerImpl.java:428)
at com.mapbox.maps.plugin.annotation.AnnotationManagerImpl.delete(AnnotationManagerImpl.java:384)
## Additional links and references
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 ANR on Android with Maps SDK 10.18.3 while calling PointAnnotationManager.delete, then trace the reported path through AnnotationManagerImpl.delete, updateSource, and addIconToStyle. Compare the calls into ImageExtensionImpl.Builder.bitmap and confirm completion when deletion no longer causes an ANR on the affected devices and OS versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100