Google Admob api create too much threads

Viewed 833

I'm having an weird problem with google admob api for android.... I dont know exactly how and when but it start creating too many threads and end up by crashing the whole system. I got this error in production and still not able to reproduce it in dev

this is the stack:

Fatal Exception: java.lang.OutOfMemoryError: pthread_create (1040KB stack) failed: Try again
   at java.lang.Thread.nativeCreate(Thread.java)
   at java.lang.Thread.start(Thread.java:1063)
   at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:921)
   at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1339)
   at com.google.android.gms.ads.internal.util.future.ac.execute(ac.java)
   at com.google.android.gms.ads.nonagon.ad.activeview.b.a(b.java:5)
   at com.google.android.gms.ads.internal.webview.j.a(j.java:30)
   at com.google.android.gms.ads.internal.webview.ad.a(ad.java:4)
   at com.google.android.gms.ads.internal.webview.ae.run(ae.java:2)
   at android.os.Handler.handleCallback(Handler.java:739)
   at android.os.Handler.dispatchMessage(Handler.java:95)
   at aam.a(aam.java)
   at com.google.android.gms.ads.internal.util.e.a(e.java:1)
   at aam.dispatchMessage(aam.java)
   at android.os.Looper.loop(Looper.java:148)
   at android.app.ActivityThread.main(ActivityThread.java:7325)
   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)

this stack doesn't say too much is just generic but if i take a print screen of my crashlytics dashboard:

enter image description here

and this goes over and over and over if i scroll down according to crashlytics there are 1024 threads at this moment

does anyone know why it is happening

is use: api("com.google.android.gms:play-services-ads:17.2.1")

this problem happens in around 5% of the sessions IN PRODUCTION what is around 1000 times PER DAY

i wasn't able to reproduce in dev. but i didn't change anything in my code or updated the app in weeks ==============update==================

i'm 100% sure this was a google's issue (as it always is), i did absolutelly NO CHANGE and the crashed decreased 90%

google never admit their mistakes but it happened at same time that firebase stopped accouting my admob revenue (out of nowhere) and the same came back without my intervention

enter image description here

1 Answers
Related