mapbox / mapbox/mapbox-maps-android

com.mapbox.common.loader.MapboxLibraryLoader.load ANR triggered by slow operations in main thread

Open
#2,672 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle: needs info
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

main (native)
tid=1 systid=12583

0
split_config.armeabi_v7a.apk!libnavigator-android.so
(Missing)
1
linker
__dl__ZN6soinfo17call_constructorsEv + 652

`java.lang.System.loadLibrary (System.java:1656)
com.mapbox.common.loader.MapboxLibraryLoader.load (MapboxLibraryLoader.kt:19)
com.mapbox.navigator.MapboxNavigationNativeInitializerImpl.create (MapboxNavigationNativeInitializerImpl.kt:15)
com.mapbox.navigator.MapboxNavigationNativeInitializerImpl.create (MapboxNavigationNativeInitializerImpl.kt:9)
androidx.startup.AppInitializer.doInitialize (AppInitializer.java:180)

androidx.startup.AppInitializer.initializeComponent (AppInitializer.java:117)
com.mapbox.common.BaseMapboxInitializer$Companion.init (BaseMapboxInitializer.kt:242)
com.mapbox.common.BaseMapboxInitializer$Companion.access$updateState (BaseMapboxInitializer.kt:77)
com.mapbox.common.BaseMapboxInitializer$Companion.access$init (BaseMapboxInitializer.kt:77)
com.mapbox.common.BaseMapboxInitializer.create (BaseMapboxInitializer.kt:46)
com.mapbox.common.BaseMapboxInitializer.create (BaseMapboxInitializer.kt:31)
androidx.startup.AppInitializer.doInitialize (AppInitializer.java:180)

com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1045)`

implementation("com.mapbox.maps:android:11.13.1") implementation("com.mapbox.navigationcore:android:3.10.0")

<meta-data android:name="com.mapbox.accessToken" android:value="@string/mapbox_access_token" />

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading MapboxLibraryLoader.kt at line 19 and follow the initialization path through MapboxNavigationNativeInitializerImpl and BaseMapboxInitializer. Reproduce or profile startup with the listed Mapbox dependencies and verify that the slow library-loading operation no longer causes an ANR on the main thread.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.