MraidController NullPointerException on Android

android

#1

Hi,
i’m using MoPub 4.3.0 on my android app and on Crashlytics i’m seeing this crash:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method ‘void android.view.View.getLocationOnScreen(int[])’ on a null object reference
at com.mopub.mraid.MraidController$7.run(SourceFile:525)
at com.mopub.mraid.MraidController$ScreenMetricsWaiter$WaitRequest.countDown(SourceFile:385)
at com.mopub.mraid.MraidController$ScreenMetricsWaiter$WaitRequest.access$400(SourceFile:371)
at com.mopub.mraid.MraidController$ScreenMetricsWaiter$WaitRequest$1$1.onPreDraw(SourceFile:407)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2040)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1110)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6089)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:773)
at android.view.Choreographer.doCallbacks(Choreographer.java:586)
at android.view.Choreographer.doFrame(Choreographer.java:556)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:759)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5422)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)


#2

Hi @LLoozIS,

Thank you for reporting this crash! Would you mind reaching out to us at support@mopub.com with the following information?

  • Number of observed app crashes/frequency of the crashes: (e.g 5 crashes in 500 ad requests et al)
  • MoPub SDK version:
  • Partner SDK version, if involved:
  • Ad unit ID associated with the crash, if possible:
  • Steps to replicate the crash, if possible:
  • Crashlytics link and/or crash logs:

Thank you!