You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
To optimize app startup, we disabled ContentProvider and explicitly call MLKit.Initialize(). However, we observed crashes on some devices, most commonly chromebook + Android 11. Note that we have integrated with both the bundled and unblunded library.
To Reproduce
Example Steps to reproduce the behavior in sample app:
Add dependency to mlkit lib specified in the SDK section below
Disable Content Provider as <provider android:name="com.google.mlkit.common.internal.MlKitInitProvider" android:authorities="${applicationId}.mlkitinitprovider" tools:node="remove" />
In the activity, before accessing any ML kit feature invoke MLKit.Initialize(context), with context value being application context. Note, care has been taken to invoke this method only once.
Expected behavior
MLKit is initialized successfully. However, on certain devices crashlytics captured the below error
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.AbstractCollection.size()' on a null object reference
at com.google.android.gms.internal.mlkit_vision_object_detection_bundled.zzar.<init>(com.google.mlkit:object-detection@@16.2.5:1)
at com.google.android.gms.internal.mlkit_vision_object_detection_bundled.zzat.<clinit>(com.google.mlkit:object-detection@@16.2.5:1)
at com.google.android.gms.internal.mlkit_vision_object_detection_bundled.zzat.zzh(com.google.mlkit:object-detection@@16.2.5:2)
at com.google.android.gms.internal.mlkit_vision_object_detection_bundled.zzat.zzj(com.google.mlkit:object-detection@@16.2.5:1)
at com.google.android.gms.internal.mlkit_vision_object_detection_bundled.zzot.<clinit>(com.google.mlkit:object-detection@@16.2.5:13)
at com.google.mlkit.vision.objects.defaults.internal.DefaultObjectsRegistrar.getComponents(com.google.mlkit:object-detection@@16.2.5:17)
at com.google.firebase.components.ComponentRuntime.discoverComponents(ComponentRuntime.java:117)
at com.google.firebase.components.ComponentRuntime.<init>(ComponentRuntime.java:99)
at com.google.firebase.components.ComponentRuntime.<init>(ComponentRuntime.java:46)
at com.google.firebase.components.ComponentRuntime$Builder.build(ComponentRuntime.java:387)
at com.google.mlkit.common.sdkinternal.MlKitContext.zza(com.google.mlkit:common@@17.3.0:9)
at com.google.mlkit.common.MlKit.initialize(com.google.mlkit:common@@17.3.0:1)
Describe the bug
To optimize app startup, we disabled ContentProvider and explicitly call MLKit.Initialize(). However, we observed crashes on some devices, most commonly chromebook + Android 11. Note that we have integrated with both the bundled and unblunded library.
To Reproduce
Example Steps to reproduce the behavior in sample app:
<provider android:name="com.google.mlkit.common.internal.MlKitInitProvider" android:authorities="${applicationId}.mlkitinitprovider" tools:node="remove" />
Expected behavior
MLKit is initialized successfully. However, on certain devices crashlytics captured the below error
SDK Info:
com.google.mlkit:object-detection:16.2.5
com.google.android.gms:play-services-mlkit-barcode-scanning:16.2.1
com.google.android.gms:play-services-mlkit-image-labeling:16.0.5
com.google.android.gms:play-services-mlkit-text-recognition:16.1.1
Smartphone:
Mostly Chromebook
100% on Android 11 devices
The text was updated successfully, but these errors were encountered: