Compass icon - Resources NotFoundException
Environment
- Android OS version: 9 - 14
- Devices affected: Wide variety
- Maps SDK Version: 10.18.3
Observed behavior and steps to reproduce
I've got this crash from the bug reporting tool, but I'm not able to reproduce.
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f08069c at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:428) at android.content.res.Resources.getDrawableForDensity(Resources.java:993) at android.content.res.Resources.getDrawable(Resources.java:933) at androidx.core.content.res.ResourcesCompat$Api21Impl.getDrawable(Unknown) at androidx.core.content.res.ResourcesCompat.getDrawable(Unknown) at com.mapbox.maps.plugin.compass.CompassViewImpl.<init>(SourceFile:7) at com.mapbox.maps.plugin.compass.CompassViewImpl.<init>(SourceFile:3) at com.mapbox.maps.plugin.compass.CompassViewPlugin$1.invoke(SourceFile:1) at com.mapbox.maps.plugin.compass.CompassViewPlugin$1.invoke(SourceFile:2) at com.mapbox.maps.plugin.compass.CompassViewPlugin.bind(Unknown:32) at com.mapbox.maps.plugin.MapPluginRegistry.createPlugin(Unknown:91) at com.mapbox.maps.MapController.createPlugin(Unknown:9) at com.mapbox.maps.MapController.initializePlugins(Unknown:288) at com.mapbox.maps.MapView.<init>(SourceFile:29) at com.mapbox.maps.MapView.<init>(SourceFile:2)
And for some lower end devices I'm sometimes getting an ANR for the same CompassViewImpl resource.
ANR: No response to onStopJob libandroidfw.so +0x6f370 android::ResStringPool::size() const libandroid_runtime.so +0xe3d28 android::android_content_StringBlock_nativeGetSize(_JNIEnv*, _jobject*, long) boot.oat +0x33eb10 art_jni_trampoline android.content.res.AssetManager.nativeOpenNonAsset (AssetManager.java:-2) android.content.res.AssetManager.openNonAsset (AssetManager.java:1104) android.content.res.ResourcesImpl.loadDrawableForCookie (ResourcesImpl.java:1064) android.content.res.ResourcesImpl.loadDrawable (ResourcesImpl.java:747) android.content.res.Resources.loadDrawable (Resources.java:1071) android.content.res.Resources.getDrawableForDensity (Resources.java:1050) android.content.res.Resources.getDrawable (Resources.java:989) androidx.core.content.res.ResourcesCompat$Api21Impl.getDrawable (Unknown) androidx.core.content.res.ResourcesCompat.getDrawable (Unknown) com.mapbox.maps.plugin.compass.CompassViewImpl.<init> (SourceFile:7) com.mapbox.maps.plugin.compass.CompassViewImpl.<init> (SourceFile:3) com.mapbox.maps.plugin.compass.CompassViewPlugin$1.invoke (SourceFile:1) com.mapbox.maps.plugin.compass.CompassViewPlugin$1.invoke (SourceFile:2) com.mapbox.maps.plugin.compass.CompassViewPlugin.bind (Unknown:32) com.mapbox.maps.plugin.MapPluginRegistry.createPlugin (Unknown:91) com.mapbox.maps.MapController.createPlugin (Unknown:9) com.mapbox.maps.MapController.initializePlugins (Unknown:288) com.mapbox.maps.MapView.<init> (SourceFile:29) com.mapbox.maps.MapView.<init> (SourceFile:2)
Expected behavior
No crash.
Notes / preliminary analysis
I can see this specific resource is available in the library and in the release aab/apk. Error count is low, so there is clearly something unique to this error. And this is so far the only resource missing error I found in our app.
Would anyone have some idea on what can I try to at least find more information about this issue?
Additional links and references
Nothing
Thank you. We already have an internal ticket to investigate this issue.
Hello, is there any update regarding this issue?
Should be fixed in https://github.com/mapbox/mapbox-maps-android/releases/tag/v10.19.0. Please re-open if the issue persists.