Activity xxx has leaked IntentReceiver com.mopub.mobileads.MoPubView

1,061 views
Skip to first unread message

johny1...@gmail.com

unread,
Dec 1, 2016, 4:01:14 PM12/1/16
to Google Mobile Ads SDK Developers
Hello,

I have integrated MoPub using AdmobMediation and now everytime and press back from an activity where an AdView is displayed I get this error (no crash) 

 has leaked IntentReceiver com.mopub.mobileads.MoPubView$1@a5a5bfa that was originally registered here. Are you missing a call to unregisterReceiver()?
                                                                android
.app.IntentReceiverLeaked: Activity xxxx has leaked IntentReceiver com.mopub.mobileads.MoPubView$1@a5a5bfa that was originally registered here. Are you missing a call to unregisterReceiver()?
                                                                    at android
.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:1030)
                                                                    at android
.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:817)
                                                                    at android
.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1256)
                                                                    at android
.app.ContextImpl.registerReceiver(ContextImpl.java:1236)
                                                                    at android
.app.ContextImpl.registerReceiver(ContextImpl.java:1230)
                                                                    at android
.content.ContextWrapper.registerReceiver(ContextWrapper.java:576)
                                                                    at com
.mopub.mobileads.MoPubView.registerScreenStateBroadcastReceiver(MoPubView.java:103)
                                                                    at com
.mopub.mobileads.MoPubView.<init>(MoPubView.java:81)
                                                                    at com
.mopub.mobileads.MoPubView.<init>(MoPubView.java:54)
                                                                    at com
.mopub.mobileads.dfp.adapters.MoPubAdapter.requestBannerAd(MoPubAdapter.java:91)
                                                                    at com
.mopub.mobileads.dfp.adapters.MoPubAdapter.requestBannerAd(MoPubAdapter.java:1)
                                                                    at com
.google.android.gms.internal.zzhl.zza(Unknown Source)
                                                                    at com
.google.android.gms.internal.zzha$zza.onTransact(Unknown Source)
                                                                    at android
.os.Binder.transact(Binder.java:387)
                                                                    at com
.google.android.gms.ads.internal.mediation.client.g.a(:com.google.android.gms.DynamiteModulesA:497)
                                                                    at com
.google.android.gms.ads.internal.mediation.f.a(:com.google.android.gms.DynamiteModulesA:362)
                                                                    at com
.google.android.gms.ads.internal.mediation.g.run(:com.google.android.gms.DynamiteModulesA:9041)
                                                                    at android
.os.Handler.handleCallback(Handler.java:739)
                                                                    at android
.os.Handler.dispatchMessage(Handler.java:95)
                                                                    at android
.os.Looper.loop(Looper.java:158)
                                                                    at android
.app.ActivityThread.main(ActivityThread.java:7229)
                                                                    at java
.lang.reflect.Method.invoke(Native Method)
                                                                    at com
.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                    at com
.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)



Looks like the "destroy()" method is not called properly when an activity is destroyed.

If I do this

@Override
protected void onDestroy() {
mAdView.destroy();
super.onDestroy();
} That error doesn't appear.

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Dec 1, 2016, 5:07:19 PM12/1/16
to Google Mobile Ads SDK Developers
Hi Johny,

Can you send us a sample app that would reproduce the issue? In any case, I would like to rule this as an issue with the MoPub's SDK but do provide us a sample app as it would be helpful in debugging the crash here.

Thanks,
Arjun Busani
Mobile Ads SDK Team

Alex Perlyuk

unread,
Jun 7, 2017, 1:45:33 AM6/7/17
to Google Mobile Ads SDK Developers
I too have the same issue, I can confirm that calling destroy() removes the error. 

Curious if there was there any official response from MoPub team?

Thanks!


On Thursday, December 1, 2016 at 4:01:14 PM UTC-5, johny1...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages