NullpointerException

338 views
Skip to first unread message

Fredrik Röstlund

unread,
Dec 18, 2020, 6:47:38 PM12/18/20
to Google Mobile Ads SDK Developers
Hey, been getting quite a lot of nullpointers lately (80% of my crashes). Any idea what could cause this?

minSDK: 19
targetSDK: 29
admob version: 19.6.0
unity mediation plugin: 3.5.1.1

Happening on all different android versions.


java.lang.NullPointerException: 
  at com.google.android.gms.ads.internal.overlay.k.h (com.google.android.gms.policy_ads_fdr_dynamite@204204100@204204100000.336078696.336078696)
  at com.google.android.gms.ads.internal.overlay.client.b.bx (com.google.android.gms.policy_ads_fdr_dynamite@204204100@204204100000.336078696.336078696:1)
  at gg.onTransact (com.google.android.gms.policy_ads_fdr_dynamite@204204100@204204100000.336078696.336078696:4)
  at android.os.Binder.transact (Binder.java:380)
  at com.google.android.gms.internal.ads.zzgw.zzb
  at com.google.android.gms.internal.ads.zzaqu.onUserLeaveHint
  at com.google.android.gms.ads.AdActivity.onUserLeaveHint
  at android.app.Activity.performUserLeaving (Activity.java:6134)
  at android.app.Instrumentation.callActivityOnUserLeaving (Instrumentation.java:1343)
  at android.app.ActivityThread.performUserLeavingActivity (ActivityThread.java:3286)
  at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:3263)
  at android.app.ActivityThread.access$1000 (ActivityThread.java:155)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1328)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:135)
  at android.app.ActivityThread.main (ActivityThread.java:5343)
  at java.lang.reflect.Method.invoke (Native Method)
  at java.lang.reflect.Method.invoke (Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:905)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:700)

Кирилл Барабаш

unread,
Dec 19, 2020, 12:33:33 PM12/19/20
to Google Mobile Ads SDK Developers
I have this issues too.

minSDK: 16
targetSDK: 30
admob version: 19.6.0

(
 //gradle settings
    implementation 'com.google.android.gms:play-services-ads:19.6.0'
    implementation 'com.google.android.gms:play-services-base:17.5.0'
 // Import the BoM for the Firebase platform
    implementation platform('com.google.firebase:firebase-bom:26.1.1')
    implementation 'com.google.firebase:firebase-crashlytics'
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-ads'
    implementation 'com.google.firebase:firebase-core'
)   

Devices and android versions:

samsung; Galaxy A10; Android 9
Xiaomi; Redmi 7A; Android 9

crash dump from crashlytics:

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'com.google.android.gms.ads.internal.overlay.n com.google.android.gms.ads.internal.overlay.AdOverlayInfoParcel.c' on a null object reference
       at com.google.android.gms.ads.internal.overlay.k.h(k.java)
       at com.google.android.gms.ads.internal.overlay.client.b.bv(b.java:1)
       at fy.onTransact(fy.java:4)
       at android.os.Binder.transact(Binder.java:675)
       at com.google.android.gms.internal.ads.zzgw.zzb(zzgw.java:7)
       at com.google.android.gms.internal.ads.zzaqu.onUserLeaveHint(zzaqu.java:6)
       at com.google.android.gms.ads.AdActivity.onUserLeaveHint(AdActivity.java:5)
       at android.app.Activity.performUserLeaving(Activity.java:7668)
       at android.app.Instrumentation.callActivityOnUserLeaving(Instrumentation.java:1479)
       at android.app.ActivityThread.performUserLeavingActivity(ActivityThread.java:4186)
       at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4171)
       at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:45)
       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7091)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

Please help to avoid this crash. Please check access to the fields "com.google.android.gms.ads.internal.overlay.n" or "com.google.android.gms.ads.internal.overlay.AdOverlayInfoParcel.c" in com.google.android.gms:play-services-ads:19.6.0 library.

May be some null check must inserted, for example

if(com.google.android.gms.ads.internal.overlay.n!=null){
    //check com.google.android.gms.ads.internal.overlay!=null and com.google.android.gms.ads.internal.overlay.AdOverlayInfoParcel!=null
}else{
    //no work beacause null
}

I am using pro guard. If I must use some special strings in proguard-rules.pro, please give it here.

Please help with this crash.


суббота, 19 декабря 2020 г. в 02:47:38 UTC+3, Fredrik Röstlund:

Mobile Ads SDK Forum Advisor Prod

unread,
Dec 20, 2020, 9:59:57 PM12/20/20
to femt...@gmail.com, google-adm...@googlegroups.com

Hi there,

Thank you for bringing this to our attention. I just want to confirm if you were able to reproduce this issue with one of our Sample apps? If yes, could you please share with us the steps so we can investigate further? Also, kindly provide us the complete stack trace for our reference. You can send this information privately via “Reply to author”, or a direct, private reply to this email.


Regards,


Google Logo
Sherwin Diesta
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q29TJ4l:ref

Кирилл Барабаш

unread,
Dec 21, 2020, 2:08:53 AM12/21/20
to Google Mobile Ads SDK Developers
Hi, Unfortunately, the error occurs only in the release version, which is published on Google play. This error does not occur during development. But after publishing the application on Google play, crash logs, which we sent you, begin to appear in the Crashlytics console. Moreover, the error does not occur in the class of our application, but during the onPause event processing (probably) inside the AdMob code. Because there is no null check in the AdMob code, but for some reason a null reference comes. We are asking you to check the values inside the AdMob functions for a probable null value. You can find the place of the error from the logs, which we gave in the previous letters. Help us please.

With best regards

понедельник, 21 декабря 2020 г. в 05:59:57 UTC+3, mobileadssdkforumadvisor:

Кирилл Барабаш

unread,
Dec 21, 2020, 2:22:15 AM12/21/20
to Google Mobile Ads SDK Developers
Error is in "com.google.android.gms.ads.AdActivity.onUserLeaveHint(AdActivity.java:5)" - inside this method some values is null but it Is not checked. From log we can see that this method calls by android operating system in function "android.app.Activity.performUserLeaving".

Please check code in function "com.google.android.gms.ads.AdActivity.onUserLeaveHint" and insert some try...catch or may be null check (==null or !=null) into some code, that can bring application crash.

Best regards,

понедельник, 21 декабря 2020 г. в 10:08:53 UTC+3, Кирилл Барабаш:

Mobile Ads SDK Forum Advisor Prod

unread,
Dec 21, 2020, 3:02:47 AM12/21/20
to femt...@gmail.com, google-adm...@googlegroups.com

Hi there,

Thank you for your response. Allow me to share your concern with the rest of the team to investigate further. Will get back to you once we have our findings.


Regards,

Leonid Belousov

unread,
Dec 23, 2020, 4:07:49 PM12/23/20
to Google Mobile Ads SDK Developers
Hello,
Same here...

Samsung Galaxy J3(2016)
Android 6.0 (SDK 23)
Min SDK 19, max SDK 30
Firebase BOM 26.2.0

Got this crash report, can't reproduce this on my side:  

java.lang.NullPointerException: 
  at com.google.android.gms.ads.internal.overlay.zzi.h (zzi.java)
  at com.google.android.gms.ads.internal.overlay.client.b.bx (b.java:1)
  at gg.onTransact (gg.java:4)
  at android.os.Binder.transact (Binder.java:387)
  at com.google.android.gms.internal.ads.zzgw.zzb (zzgw.java)
  at com.google.android.gms.internal.ads.zzaqu.onUserLeaveHint (zzaqu.java)
  at com.google.android.gms.ads.AdActivity.onUserLeaveHint (AdActivity.java)
  at android.app.Activity.performUserLeaving (Activity.java:7047)
  at android.app.Instrumentation.callActivityOnUserLeaving (Instrumentation.java:1350)
  at android.app.ActivityThread.performUserLeavingActivity (ActivityThread.java:4545)
  at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:4522)
  at android.app.ActivityThread.access$1300 (ActivityThread.java:222)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1807)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:158)
  at android.app.ActivityThread.main (ActivityThread.java:7230)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)


Mobile Ads SDK Forum Advisor Prod

unread,
Dec 23, 2020, 5:01:05 PM12/23/20
to belou...@gmail.com, google-adm...@googlegroups.com
Hi Leonid,

Thank you for bringing this issue to our attention. We would ask if you can share with us some more information via "Reply to author".
  • We need more description of what is happening. If we can not reproduce it. Very hard to find an answer.
  • A sample app with your implementation so we can test your code
  • Any error codes

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 

 

ref:_00D1U1174p._5004Q29TJ4l:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Jan 7, 2021, 10:29:32 PM1/7/21
to bestpe...@gmail.com, google-adm...@googlegroups.com

Hi Fredrik,

Thank you for reaching out to us.

Could you kindly provide the details below (via Reply to author or a direct, private reply to mobileads...@gmail.com) so that we can further investigate this issue?

  • Copy of a sample project (replicating this issue)
  • Steps to replicate the issue

 

Google Logo
Ziv Yves Sanchez
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q29TJ4l:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Jan 14, 2021, 8:52:50 PM1/14/21
to belou...@gmail.com, google-adm...@googlegroups.com

Hi Leonid,

Thank you for providing an additional report for this. I'll add the report to our ongoing investigation in order to help on it.

For anyone else experiencing this issue, it would also be much appreciated if you could kindly provide the details below (via Reply to author or a direct, private reply to mobileads...@gmail.com) so that we can further investigate this issue:

  • Copy of a sample project (replicating this issue)
  • Steps to replicate the issue

 

Google Logo
Ziv Yves Sanchez
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q29TJ4l:ref

itzno...@gmail.com

unread,
Feb 2, 2021, 8:17:07 AM2/2/21
to Google Mobile Ads SDK Developers
We are having same crashes with a Very High Velocity,
Check the Screenshot below from Firebase Crashlytics:

Screenshot 2021-02-02 at 6.44.37 PM.png

The Stacktrace:

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'com.google.android.gms.ads.internal.overlay.n com.google.android.gms.ads.internal.overlay.AdOverlayInfoParcel.c' on a null object reference
       at com.google.android.gms.ads.internal.overlay.k.h(k.java)
       at com.google.android.gms.ads.internal.overlay.client.b.bx(b.java:1)
       at gg.onTransact(gg.java:4)
       at android.os.Binder.transact(Binder.java:380)
       at com.google.android.gms.internal.ads.zzgw.zzb(zzgw.java:21)
       at com.google.android.gms.internal.ads.zzaqu.onUserLeaveHint(zzaqu.java:54)
       at com.google.android.gms.ads.AdActivity.onUserLeaveHint(AdActivity.java:32)
       at android.app.Activity.performUserLeaving(Activity.java:6778)
       at android.app.Instrumentation.callActivityOnUserLeaving(Instrumentation.java:1348)
       at android.app.ActivityThread.performUserLeavingActivity(ActivityThread.java:4380)
       at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4357)
       at android.app.ActivityThread.access$1200(ActivityThread.java:218)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1745)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:145)
       at android.app.ActivityThread.main(ActivityThread.java:6934)
       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:1404)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 2, 2021, 9:38:11 AM2/2/21
to itzno...@gmail.com, google-adm...@googlegroups.com
Hi DarShan,

Thank you for sending us over the screenshot. I have looked at it and also saw that you have a newer post here . I will be responding to you on the other thread, and would ask if we may continue it on that other thread.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q29TJ4l:ref

qyzhaoj...@gmail.com

unread,
Feb 8, 2021, 4:28:53 AM2/8/21
to Google Mobile Ads SDK Developers
same crash on 19.5.0

 java.lang.NullPointerException: Attempt to read from field 'com.google.android.gms.ads.internal.overlay.n com.google.android.gms.ads.internal.overlay.AdOverlayInfoParcel.c' on a null object reference at com.google.android.gms.ads.internal.overlay.k.h(:com.google.android.gms.policy_ads_fdr_dynamite@204204100@204204100057.336078696.336078696:0) at com.google.android.gms.ads.internal.overlay.client.b.bv(:com.google.android.gms.policy_ads_fdr_dynamite@204204100@204204100057.336078696.336078696:1) at fy.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@204204100@204204100057.336078696.336078696:4) at android.os.Binder.transact(Binder.java:662) at com.google.android.gms.internal.ads.duf.b(com.google.android.gms:play-services-ads-base@@19.5.0:21) at com.google.android.gms.internal.ads.qs.onUserLeaveHint(com.google.android.gms:play-services-ads-lite@@19.5.0:54) at com.google.android.gms.ads.AdActivity.onUserLeaveHint(com.google.android.gms:play-services-ads-lite@@19.5.0:32) at android.app.Activity.performUserLeaving(Activity.java:7470) at android.app.Instrumentation.callActivityOnUserLeaving(Instrumentation.java:1476) at android.app.ActivityThread.performUserLeavingActivity(ActivityThread.java:4031) at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4013) at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:201) at android.app.ActivityThread.main(ActivityThread.java:6861) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) Back traces ends.

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 8, 2021, 9:16:57 AM2/8/21
to qyzhaoj...@gmail.com, google-adm...@googlegroups.com
Hi Qyzhaoj,

Thank you for bringing this to our attention.I will bring this to our team and add it to the information that we already have regarding this issue. Once we have some feedback on this we will be certain to pass this along. Once we get more information back we will be certain to pass it along.

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 14, 2021, 8:23:32 PM2/14/21
to qyzhaoj...@gmail.com, google-adm...@googlegroups.com

Hi all,

Thank you for your patience on this concern.

The team has found the cause of this issue, and has already implemented a fix that should be included in the next version update of the AdMob SDK. You may keep an eye out on our release notes for future updates on this.
 

Google Logo
Ziv Yves Sanchez
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q29TJ4l:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 1, 2021, 2:16:05 PM3/1/21
to qyzhaoj...@gmail.com, google-adm...@googlegroups.com
Hi everyone,

I work with Ziv and I have good news, my team has reported that this crash has subsided substantially and will continue to improve on all SDK versions this has been reported in. Please report back to us if you are still seeing the crash.

Regards,

Google Logo
Aryeh Baker
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q29TJ4l:ref

Anton Naumuk

unread,
Mar 17, 2021, 7:47:40 AM3/17/21
to Google Mobile Ads SDK Developers
Hi everyone,
Our application crashes with a similar call stack on 19.6.0 AdMob. Is fix server-side or we should update SDK? Can you please share which release contains the fix?

Thank you

Screenshot 2021-03-17 144033.png

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 17, 2021, 3:40:51 PM3/17/21
to a_na...@wgmobile.net, google-adm...@googlegroups.com
Hi Anton,

Thank you for getting back to us about this. I have looked further into this and saw that they have advised us that this issue should subside or completely disappear with v20. If there are any issues after that we would suggest reaching back out and letting us know whats happening.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q29TJ4l:ref

Mobile Ads SDK Forum Advisor

unread,
Jun 24, 2021, 6:32:45 AM6/24/21
to a_na...@wgmobile.net, google-adm...@googlegroups.com
Hi Anton,

I hope you're doing well.

I work with William and I just want to circle back on this. The team mentioned that this has been fixed. Please let me know if you still encounter the issue so I could raise this to the team once again.

Regards,
Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q29TJ4l:ref
Reply all
Reply to author
Forward
0 new messages