Android Mopub 5.4.0 ANR


#1

Hi.
MoPub SDK 5.4 generates ANR errors - fine in 5.3 without any other app code changes.
SDK initilization is done properly.

getRequestQueue() is called in two threads while it is being synchronized.

“main” prio=5 tid=1 Blocked
| group=“main” sCount=1 dsCount=0 obj=0x748008b0 self=0x7f93640a00
| sysTid=19536 nice=0 cgrp=default sched=0/0 handle=0x7f974e9a98
| state=S schedstat=( 867098798 46070312 654 ) utm=74 stm=12 core=1 HZ=100
| stack=0x7fe9660000-0x7fe9662000 stackSize=8MB
| held mutexes=
at com.mopub.network.Networking.getRequestQueue (SourceFile:69)

  • waiting to lock <0x01a9b16f> (a java.lang.Class<com.mopub.network.Networking>) held by thread 31
    at com.mopub.network.AdLoader.a (SourceFile:255)
    at com.mopub.network.AdLoader.loadNextAd (SourceFile:154)
  • locked <0x042a8e7c> (a java.lang.Object)
    at com.mopub.mobileads.AdViewController.b (SourceFile:519)
    at com.mopub.mobileads.AdViewController.a (SourceFile:270)
    at com.mopub.mobileads.AdViewController.f (SourceFile:250)
    at com.mopub.mobileads.AdViewController.loadAd (SourceFile:232)
    at com.mopub.mobileads.MoPubView.loadAd (SourceFile:108)
    at com.xxxxxx.a.b.e.d (SourceFile:104)
    at com.xxxxxx.a.b.a.e (SourceFile:152)
    at com.xxxxxx.a.b.c.c (SourceFile:158)
    at com.xxxxxx.a.b.c.a (SourceFile:37)
    at com.xxxxxx.a.b$1.onInitializationFinished (SourceFile:47)
  • locked <0x0d70a305> (a java.util.ArrayList)
    at com.mopub.common.MoPub$1.run (SourceFile:322)
    at android.os.Handler.handleCallback (Handler.java:751)
    at android.os.Handler.dispatchMessage (Handler.java:95)
    at android.os.Looper.loop (Looper.java:154)
    at android.app.ActivityThread.main (ActivityThread.java:6144)
    at java.lang.reflect.Method.invoke! (Native method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:886)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:776)

“AsyncTask #2” prio=5 tid=31 Waiting
| group=“main” sCount=1 dsCount=0 obj=0x12c1a160 self=0x7f6b325a00
| sysTid=19822 nice=10 cgrp=bg_non_interactive sched=0/0 handle=0x7f6a873450
| state=S schedstat=( 121453707 25078639 263 ) utm=9 stm=3 core=1 HZ=100
| stack=0x7f6a771000-0x7f6a773000 stackSize=1037KB
| held mutexes=
at java.lang.Object.wait! (Native method)

  • waiting on <0x0a87577b> (a java.lang.Object)
    at xk.b (SourceFile:173)
    at xk.d (SourceFile:186)
  • locked <0x0a87577b> (a java.lang.Object)
    at com.android.webview.chromium.WebViewChromiumFactoryProvider.getStatics (SourceFile:204)
  • locked <0x0a87577b> (a java.lang.Object)
    at android.webkit.WebSettings.getDefaultUserAgent (WebSettings.java:1246)
    at com.mopub.network.Networking.getUserAgent (SourceFile:149)
  • locked <0x01a9b16f> (a java.lang.Class<com.mopub.network.Networking>)
    at com.mopub.network.Networking.getRequestQueue (SourceFile:75)
  • locked <0x01a9b16f> (a java.lang.Class<com.mopub.network.Networking>)
    at com.mopub.network.TrackingRequest.makeTrackingHttpRequest (SourceFile:110)
    at com.mopub.network.TrackingRequest.makeTrackingHttpRequest (SourceFile:148)
    at com.mopub.mobileads.MoPubConversionTracker.reportAppOpen (SourceFile:86)
    at com.mopub.common.privacy.PersonalInfoManager$5.onInitializationFinished (SourceFile:566)
    at com.mopub.common.privacy.MoPubIdentifier.a (SourceFile:221)
    at com.mopub.common.privacy.MoPubIdentifier.a (SourceFile:201)
    at com.mopub.common.privacy.MoPubIdentifier.a (SourceFile:188)
    at com.mopub.common.privacy.MoPubIdentifier$a.doInBackground (SourceFile:2105)
    at android.os.AsyncTask$2.call (AsyncTask.java:305)
    at java.util.concurrent.FutureTask.run (FutureTask.java:237)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
    at java.lang.Thread.run (Thread.java:761)

#2

Also facing this issue after updating mopub sdk to latest version 5.4.0. Its occurring at the time of ad load call


#3

I have reverted to 5.3.0 and no more ANR errors - no other changes made. Simply revert from 5.4.0 to 5.3.0.


#4

Hi,

Thanks for reporting this.

While we released a fix in the 5.4.0 Android SDK version that helped mitigate the ANR (Application Not Responding), it seems there is another door causing ANRs in 5.4.

Our engineering team is currently investigating it and we hope to a fix soon.

If you any other questions, feel free to reach out to support@mopub.com.

Thanks!


#5

me too.


#6

I didn’t even notice ANRs on 5.3 but I am having many ANR report with MoPub 5.4