Memory leak in com.google.android.gms.ads.internal.webview

707 views
Skip to first unread message

Pavel Repkin

unread,
Oct 28, 2019, 3:04:24 AM10/28/19
to Google Mobile Ads SDK Developers
Hi, guys!
Leak Canary reports this leak in the latest Ads SDK release.
com.google.firebase:firebase-ads:18.2.0
Is this an issue you are aware of?

LeakingInstance(referenceKey=58e6f987-be68-4c78-bd46-b50adafb8ee2, referenceName=, instanceClassName=yo.activity.MainFragment, watchDurationMillis=5105, exclusionStatus=null, leakTrace=

├─ mw
│    Leaking: NO (it's a GC root)
│    ↓ mw.a
│         ~
├─ com.google.android.gms.ads.internal.webview.w
│    Leaking: UNKNOWN
│    View#mAttachInfo is null (view detached)
│    View#mParent is null
│    View.mID=-1 (name not found)
│    View.mWindowAttachCount=1
│    ↓ w.a
│        ~
├─ com.google.android.gms.ads.internal.webview.aa
│    Leaking: YES (View detached and has parent)
│    View#mAttachInfo is null (view detached)
│    View#mParent is set
│    View.mID=-1 (name not found)
│    View.mWindowAttachCount=1
│    ↓ aa.U
├─ android.view.WindowManagerImpl
│    Leaking: YES (aa↑ is leaking)
│    ↓ WindowManagerImpl.mContext
├─ android.app.ContextImpl
│    Leaking: YES (WindowManagerImpl↑ is leaking)
│    ↓ ContextImpl.mAutofillClient
├─ yo.activity.MainActivity
│    Leaking: YES (ContextImpl↑ is leaking and MainActivity#mDestroyed is true)
│    ↓ MainActivity.mFragments
├─ androidx.fragment.app.FragmentController
│    Leaking: YES (MainActivity↑ is leaking)
│    ↓ FragmentController.mHost
├─ androidx.fragment.app.FragmentActivity$HostCallbacks
│    Leaking: YES (FragmentController↑ is leaking)
│    ↓ FragmentActivity$HostCallbacks.mFragmentManager
├─ androidx.fragment.app.FragmentManagerImpl
│    Leaking: YES (FragmentActivity$HostCallbacks↑ is leaking)
│    ↓ FragmentManagerImpl.mAdded
├─ java.util.ArrayList
│    Leaking: YES (FragmentManagerImpl↑ is leaking)
│    ↓ ArrayList.elementData
├─ java.lang.Object[]
│    Leaking: YES (ArrayList↑ is leaking)
│    ↓ array Object[].[0]
╰→ yo.activity.MainFragment
​     Leaking: YES (RefWatcher was watching this and MainFragment#mFragmentManager is null)
, retainedHeapSize=null)

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 28, 2019, 7:17:59 AM10/28/19
to pavel....@gmail.com, google-adm...@googlegroups.com
Hi Pavel,

Thank you for reaching out to us. However, it seems that you already had a discussion with my colleague, Deepika, on this thread.
Please continue the discussion there instead for better tracking of the issues.

Regards,
Teejay Pimentel
Mobile Ads SDK Team

ref:_00D1U1174p._5001UKOe97:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 28, 2019, 9:28:09 AM10/28/19
to pavel....@gmail.com, google-adm...@googlegroups.com
Hi Pavel,

Apologies if I miss out that this is a new issue.

Would it be possible for you to provide the following details in order for us to investigate the issue further?
  • Sample project where the issue is reproducible and its steps to trigger the memory leak
  • Is the issue was reproducible using our sample Ad Unit IDs?
Please use the "Reply Privately to Author" option to share the details privately.

Pablo Alfonso

unread,
Jun 14, 2020, 5:30:40 PM6/14/20
to Google Mobile Ads SDK Developers
Same issue here. 
Would you able to reproduce internally? Any solution?

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 15, 2020, 12:46:06 AM6/15/20
to google-adm...@googlegroups.com
Hi there,

I could see that this is an old post. Could you confirm if you are experiencing the issue using the latest version of the SDK? If so, could you please provide the following details for us to investigate the issue further?
    •  Sample project where the issue is reproducible and its steps to trigger the memory leak
    Reply all
    Reply to author
    Forward
    0 new messages