A memory leak occurs when AdManagerAdView is clicked

75 views
Skip to first unread message

Pavel Sidyakin

unread,
Mar 6, 2023, 7:23:57 AM3/6/23
to Google Mobile Ads SDK Developers
Get the sample: https://github.com/PavelSidyakin/ad_sdk_leak_demo/tree/click_leak

The app contains an activity with AdManagerAdView.

Steps:
1. Build and run the app.
2. Wait for the banner to load.
3. Click the banner -> a browser is opened.
4. Return to the app.
5. Rotate the screen.
6. Attach the profiler.

Expected result: no leaks.
Actual result: BannerActivity leaks. 

Ads version: 21.5.0.



The issue is reproduced on emulator:

Properties
avd.ini.displayname              CrazyTiger
avd.ini.encoding                 UTF-8
AvdId                            CrazyTiger
disk.dataPartition.size          16G
fastboot.chosenSnapshotFile
fastboot.forceChosenSnapshotBoot no
fastboot.forceColdBoot           no
fastboot.forceFastBoot           yes
hw.accelerometer                 yes
hw.arc                           false
hw.audioInput                    yes
hw.battery                       yes
hw.camera.back                   virtualscene
hw.camera.front                  emulated
hw.cpu.ncore                     8
hw.device.hash2                  MD5:121629bcfab97028767e9021d5e4cdd1
hw.device.manufacturer           Google
hw.device.name                   Nexus 7 2013
hw.dPad                          no
hw.gps                           yes
hw.gpu.enabled                   yes
hw.gpu.mode                      host
hw.initialOrientation            Portrait
hw.keyboard                      yes
hw.lcd.density                   320
hw.lcd.height                    1920
hw.lcd.width                     1200
hw.mainKeys                      no
hw.ramSize                       4096
hw.sdCard                        yes
hw.sensors.orientation           yes
hw.sensors.proximity             no
hw.trackBall                     no
image.androidVersion.api         31
image.sysdir.1                   system-images\android-31\google_apis\x86_64\
PlayStore.enabled                false
runtime.network.latency          none
runtime.network.speed            full
showDeviceFrame                  no
skin.dynamic                     yes
skin.path.backup                 _no_skin
tag.display                      Google APIs
tag.id                           google_apis
vm.heapSize                      256



Mobile Ads SDK Forum Advisor

unread,
Mar 6, 2023, 1:42:51 PM3/6/23
to fox...@gmail.com, google-adm...@googlegroups.com

Hi Pavel,

Thank you for reaching out to us.

I've seen that you've a opened thread with us which we already shared to the wider team, and they currently investigating it. Can you confirm if your concern for memory leak on this thread is the same as the existing thread? If yes, I would suggest to wait for our wider team response to you on the existing thread that you have for better tracking of this concern.

Regards,

Google Logo Mobile Ads SDK Team


ref:_00D1U1174p._5004Q2jWNXP:ref

Pavel Sidyakin

unread,
Mar 6, 2023, 1:56:33 PM3/6/23
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hello!

Thank you for the reply.

This issue seems different from the other thread. 

In the other thread, the issue happens just because the banner is in a layout when an activity is finished. And the issue is not reproduced on an emulator.

In this thread, the issue is reproduced on an emulator and related to clicking on the banner. So, most likely, this is a different issue, so I created a separate thread. 

Regards,
Pavel

Mobile Ads SDK Forum Advisor

unread,
Mar 7, 2023, 12:50:03 AM3/7/23
to fox...@gmail.com, google-adm...@googlegroups.com
Hello Pavel,

Thank you for the clarification. I've successfully replicated the memory leak with the project and instructions you mentioned on our end. We will now be forwarding this issue to the wider team. We will keep you updated for any further developments.
Reply all
Reply to author
Forward
0 new messages