Android Question What could be the cause of this error (AdUtil.isViewVisible)?

asales

Expert
Licensed User
Longtime User
Sometimes I get this error below in Firebase Crashlytics.

I always check if the adview is initialized, when I check if adview is visible (to avoid policy issue when I show a dialog with another adview).

This error happened in a Nexus 5X with Android 6.0.1.
I think this phone is used by Google in tests, because I just published the new version of the app and this the first phone (and only phone until now) that raises this error.

What could be happen?

Any help are welcome. Thanks.
B4X:
Fatal Exception: java.lang.NullPointerException:
Attempt to invoke virtual method 'int android.view.View.getVisibility()' on a null object reference
       at com.google.android.gms.ads.internal.util.AdUtil.isViewVisible(AdUtil.java:1123)
       at com.google.android.gms.ads.internal.activeview.PositionWatcher.fireMeasurements(PositionWatcher.java:360)
       at com.google.android.gms.ads.internal.activeview.PositionWatcher.lambda$fireMeasurementsPost$0$com-google-android-gms-ads-internal-activeview-PositionWatcher(PositionWatcher.java:140)
       at com.google.android.gms.ads.internal.activeview.PositionWatcher$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at com.google.android.gms.libs.punchclock.threads.TracingHandler.dispatchMessageTraced(TracingHandler.java:223)
       at com.google.android.gms.ads.internal.util.AdMobHandler.dispatchMessageTraced(AdMobHandler.java:39)
       at com.google.android.gms.libs.punchclock.threads.TracingHandler.dispatchMessage(TracingHandler.java:183)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5421)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
 
Top