Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in AdMob banner ads contributing to OutOfMemory exceptions #717

Open
SimpsOff opened this issue Jul 5, 2024 · 3 comments
Open

Comments

@SimpsOff
Copy link

SimpsOff commented Jul 5, 2024

After noticing our Android apps increased crash rate in Google Play Console, investigations lead to an unexpected number of OOM exceptions. This was mitigated almost completely when we disabled AdMob ads. After some investigations, we added code to capture unhandled exceptions locally, and ran our apps until we received an OOM. I've captured the heapdump from there and converted the hprof file.

Here this is from the MAT tool leak suspects report:

One instance of “com.google.android.gms.ads.nonagon.signalgeneration.k” loaded by “dalvik.system.DelegateLastClassLoader @ 0x13150b10” occupies 41,583,280 (14.37%) bytes. The memory is accumulated in one instance of “java.lang.Object[]”, loaded by “<system class loader>”, which occupies 37,175,312 (12.85%) bytes.

Thread “m.ahy @ 0x12e8d208” has a local variable or reference to “class m.ahy @ 0x131e9870” which is on the shortest path to “java.lang.Object[16384] @ 0x239115e8”. The thread m.ahy @ 0x12e8d208 keeps local variables with total size 528 (0.00%) bytes.

Keywords
com.google.android.gms.ads.nonagon.signalgeneration.k
dalvik.system.DelegateLastClassLoader
java.lang.Object[]

image

To me, it looks like the ArrayDeque is being excessively used, keep around for quite some time, and never cleared, constantly growing over time, eventually leading to OOM crashes if the app lives long enough.

Please fix this leak, as it is preventing me from using google AdMob ads in my app, because we were starting to approach the "Bad Behavior" crash threshold on Google Play due the OOM exceptions being caused (along with another misbehaving ad library).

@SimpsOff
Copy link
Author

SimpsOff commented Jul 5, 2024

Please let me know if there are additional diagnostic information that will help get this issue resolved, I will do my best to provide them.

@SimpsOff SimpsOff changed the title Memory leak in AdMob banner ads Memory leak in AdMob banner ads contributing to OutOfMemory exceptions Jul 5, 2024
@AndroidDeveloperLB
Copy link

This should probably be reported on the google group of Admob, no?

https://groups.google.com/g/google-admob-ads-sdk

@NVentimiglia
Copy link
Member

Correct.

Please Report this issue to SDK Support :

https://groups.google.com/g/google-admob-ads-sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants