Open Bug 1962070 Opened 20 days ago Updated 5 days ago

Memory leaks related to DefaultToolbarIntegration in TabbedBrowsingTest.tabsCounterShortcutMenuNewPrivateTabTest

Categories

(Firefox for Android :: Toolbar, defect)

All
Android
defect

Tracking

()

People

(Reporter: segun, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Some of the leaks detected in TabbedBrowsingTest.tabsCounterShortcutMenuNewPrivateTabTest are already resolved DefaultToolbarIntegration in 1962065.
However, there are some others with different signatures but pointing to similar issues

Leak signatures

  1. 4078dc6b74141c6e9cc5ee84c128f0ae12bc2e84
  2. 931165b3cdaca5f50b049d94d0ba97030f1cc0e6
  3. 2c0b7f8b569562be8f84d812a604b10e66d4d04b

Leak traces

Leak 1 - 4078dc6b74141c6e9cc5ee84c128f0ae12bc2e84

53126 bytes retained by leaking objects
Signature: 4078dc6b74141c6e9cc5ee84c128f0ae12bc2e84
┬───
│ GC Root: System class
│
├─ android.view.inputmethod.InputMethodManager class
│    Leaking: NO (InputMethodManager↓ is not leaking and a class is never leaking)
│    ↓ static InputMethodManager.sInstance
├─ android.view.inputmethod.InputMethodManager instance
│    Leaking: NO (DecorView↓ is not leaking and InputMethodManager is a singleton)
│    ↓ InputMethodManager.mNextServedView
├─ com.android.internal.policy.DecorView instance
│    Leaking: NO (View attached)
│    View is part of a window view hierarchy
│    View.mAttachInfo is not null (view attached)
│    View.mWindowAttachCount = 1
│    mContext instance of com.android.internal.policy.DecorContext, wrapping activity org.mozilla.fenix.HomeActivity with mDestroyed = false
│    ↓ View.mListenerInfo
│           ~~~~~~~~~~~~~
├─ android.view.View$ListenerInfo instance
│    Leaking: UNKNOWN
│    Retaining 732.0 kB in 13214 objects
│    ↓ View$ListenerInfo.mOnLayoutChangeListeners
│                        ~~~~~~~~~~~~~~~~~~~~~~~~
├─ java.util.ArrayList instance
│    Leaking: UNKNOWN
│    Retaining 731.9 kB in 13213 objects
│    ↓ ArrayList[0]
│               ~~~
├─ mozilla.components.browser.menu2.BrowserMenuController$$ExternalSyntheticLambda2 instance
│    Leaking: UNKNOWN
│    Retaining 731.8 kB in 13211 objects
│    ↓ BrowserMenuController$$ExternalSyntheticLambda2.f$0
│                                                      ~~~
├─ mozilla.components.browser.menu2.BrowserMenuController instance
│    Leaking: UNKNOWN
│    Retaining 731.8 kB in 13210 objects
│    ↓ BrowserMenuController.menuCandidates
│                            ~~~~~~~~~~~~~~
├─ java.util.ArrayList instance
│    Leaking: UNKNOWN
│    Retaining 731.2 kB in 13190 objects
│    ↓ ArrayList[0]
│               ~~~
├─ mozilla.components.concept.menu.candidate.TextMenuCandidate instance
│    Leaking: UNKNOWN
│    Retaining 771 B in 22 objects
│    ↓ TextMenuCandidate.onClick
│                        ~~~~~~~
├─ mozilla.components.ui.tabcounter.TabCounterMenu$$ExternalSyntheticLambda3 instance
│    Leaking: UNKNOWN
│    Retaining 12 B in 1 objects
│    ↓ TabCounterMenu$$ExternalSyntheticLambda3.f$0
│                                               ~~~
├─ org.mozilla.fenix.components.toolbar.DefaultToolbarIntegration$$ExternalSyntheticLambda6 instance
│    Leaking: UNKNOWN
│    Retaining 728.8 kB in 13117 objects
│    ↓ DefaultToolbarIntegration$$ExternalSyntheticLambda6.f$0
│                                                          ~~~
├─ org.mozilla.fenix.components.toolbar.DefaultToolbarIntegration instance
│    Leaking: UNKNOWN
│    Retaining 728.8 kB in 13116 objects
│    context instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ DefaultToolbarIntegration.context
│                                ~~~~~~~
╰→ org.mozilla.fenix.HomeActivity instance
​     Leaking: YES (ObjectWatcher was watching this because org.mozilla.fenix.HomeActivity received Activity#onDestroy() callback and Activity#mDestroyed is true)
​     Retaining 53.1 kB in 1213 objects
​     key = 41f6941f-0369-401d-b365-4dce7c74e351
​     watchDurationMillis = 8043
​     retainedDurationMillis = 3041
​     mApplication instance of org.mozilla.fenix.DebugFenixApplication
​     mBase instance of androidx.appcompat.view.ContextThemeWrapper

Leak 2 - 931165b3cdaca5f50b049d94d0ba97030f1cc0e6

3781 bytes retained by leaking objects
Signature: 931165b3cdaca5f50b049d94d0ba97030f1cc0e6
┬───
│ GC Root: System class
│
├─ android.view.inputmethod.InputMethodManager class
│    Leaking: NO (InputMethodManager↓ is not leaking and a class is never leaking)
│    ↓ static InputMethodManager.sInstance
├─ android.view.inputmethod.InputMethodManager instance
│    Leaking: NO (DecorView↓ is not leaking and InputMethodManager is a singleton)
│    ↓ InputMethodManager.mNextServedView
├─ com.android.internal.policy.DecorView instance
│    Leaking: NO (View attached)
│    View is part of a window view hierarchy
│    View.mAttachInfo is not null (view attached)
│    View.mWindowAttachCount = 1
│    mContext instance of com.android.internal.policy.DecorContext, wrapping activity org.mozilla.fenix.HomeActivity with mDestroyed = false
│    ↓ View.mListenerInfo
│           ~~~~~~~~~~~~~
├─ android.view.View$ListenerInfo instance
│    Leaking: UNKNOWN
│    Retaining 732.0 kB in 13214 objects
│    ↓ View$ListenerInfo.mOnLayoutChangeListeners
│                        ~~~~~~~~~~~~~~~~~~~~~~~~
├─ java.util.ArrayList instance
│    Leaking: UNKNOWN
│    Retaining 731.9 kB in 13213 objects
│    ↓ ArrayList[0]
│               ~~~
├─ mozilla.components.browser.menu2.BrowserMenuController$$ExternalSyntheticLambda2 instance
│    Leaking: UNKNOWN
│    Retaining 731.8 kB in 13211 objects
│    ↓ BrowserMenuController$$ExternalSyntheticLambda2.f$0
│                                                      ~~~
├─ mozilla.components.browser.menu2.BrowserMenuController instance
│    Leaking: UNKNOWN
│    Retaining 731.8 kB in 13210 objects
│    ↓ BrowserMenuController.menuCandidates
│                            ~~~~~~~~~~~~~~
├─ java.util.ArrayList instance
│    Leaking: UNKNOWN
│    Retaining 731.2 kB in 13190 objects
│    ↓ ArrayList[0]
│               ~~~
├─ mozilla.components.concept.menu.candidate.TextMenuCandidate instance
│    Leaking: UNKNOWN
│    Retaining 771 B in 22 objects
│    ↓ TextMenuCandidate.onClick
│                        ~~~~~~~
├─ mozilla.components.ui.tabcounter.TabCounterMenu$$ExternalSyntheticLambda3 instance
│    Leaking: UNKNOWN
│    Retaining 12 B in 1 objects
│    ↓ TabCounterMenu$$ExternalSyntheticLambda3.f$0
│                                               ~~~
├─ org.mozilla.fenix.components.toolbar.DefaultToolbarIntegration$$ExternalSyntheticLambda6 instance
│    Leaking: UNKNOWN
│    Retaining 728.8 kB in 13117 objects
│    ↓ DefaultToolbarIntegration$$ExternalSyntheticLambda6.f$0
│                                                          ~~~
├─ org.mozilla.fenix.components.toolbar.DefaultToolbarIntegration instance
│    Leaking: UNKNOWN
│    Retaining 728.8 kB in 13116 objects
│    context instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ DefaultToolbarIntegration.interactor
│                                ~~~~~~~~~~
├─ org.mozilla.fenix.components.toolbar.interactor.DefaultBrowserToolbarInteractor instance
│    Leaking: UNKNOWN
│    Retaining 501 B in 18 objects
│    ↓ DefaultBrowserToolbarInteractor.browserToolbarController
│                                      ~~~~~~~~~~~~~~~~~~~~~~~~
├─ org.mozilla.fenix.components.toolbar.DefaultBrowserToolbarController instance
│    Leaking: UNKNOWN
│    Retaining 100 B in 3 objects
│    activity instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ DefaultBrowserToolbarController.navController
│                                      ~~~~~~~~~~~~~
├─ androidx.navigation.NavHostController instance
│    Leaking: UNKNOWN
│    Retaining 272.4 kB in 5270 objects
│    activity instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    context instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ NavController.navigatorState
│                    ~~~~~~~~~~~~~~
├─ java.util.LinkedHashMap instance
│    Leaking: UNKNOWN
│    Retaining 253 B in 7 objects
│    ↓ LinkedHashMap[key()]
│                   ~~~~~~~
├─ androidx.navigation.fragment.FragmentNavigator instance
│    Leaking: UNKNOWN
│    Retaining 193 B in 7 objects
│    context instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ FragmentNavigator.fragmentManager
│                        ~~~~~~~~~~~~~~~
├─ androidx.fragment.app.FragmentManagerImpl instance
│    Leaking: UNKNOWN
│    Retaining 195.1 kB in 3271 objects
│    ↓ FragmentManager.mPrimaryNav
│                      ~~~~~~~~~~~
╰→ org.mozilla.fenix.home.HomeFragment instance
​     Leaking: YES (ObjectWatcher was watching this because org.mozilla.fenix.home.HomeFragment received Fragment#onDestroy() callback. Conflicts with Fragment.mLifecycleRegistry.state is INITIALIZED)
​     Retaining 3.8 kB in 132 objects
​     key = 1487cda2-26d9-4282-ae01-c80e28121392
​     watchDurationMillis = 8033
​     retainedDurationMillis = 3019

Leak 3 - 2c0b7f8b569562be8f84d812a604b10e66d4d04b

189448 bytes retained by leaking objects
Signature: 2c0b7f8b569562be8f84d812a604b10e66d4d04b
┬───
│ GC Root: System class
│
├─ android.view.inputmethod.InputMethodManager class
│    Leaking: NO (InputMethodManager↓ is not leaking and a class is never leaking)
│    ↓ static InputMethodManager.sInstance
├─ android.view.inputmethod.InputMethodManager instance
│    Leaking: NO (DecorView↓ is not leaking and InputMethodManager is a singleton)
│    ↓ InputMethodManager.mNextServedView
├─ com.android.internal.policy.DecorView instance
│    Leaking: NO (View attached)
│    View is part of a window view hierarchy
│    View.mAttachInfo is not null (view attached)
│    View.mWindowAttachCount = 1
│    mContext instance of com.android.internal.policy.DecorContext, wrapping activity org.mozilla.fenix.HomeActivity with mDestroyed = false
│    ↓ View.mListenerInfo
│           ~~~~~~~~~~~~~
├─ android.view.View$ListenerInfo instance
│    Leaking: UNKNOWN
│    Retaining 732.0 kB in 13214 objects
│    ↓ View$ListenerInfo.mOnLayoutChangeListeners
│                        ~~~~~~~~~~~~~~~~~~~~~~~~
├─ java.util.ArrayList instance
│    Leaking: UNKNOWN
│    Retaining 731.9 kB in 13213 objects
│    ↓ ArrayList[0]
│               ~~~
├─ mozilla.components.browser.menu2.BrowserMenuController$$ExternalSyntheticLambda2 instance
│    Leaking: UNKNOWN
│    Retaining 731.8 kB in 13211 objects
│    ↓ BrowserMenuController$$ExternalSyntheticLambda2.f$0
│                                                      ~~~
├─ mozilla.components.browser.menu2.BrowserMenuController instance
│    Leaking: UNKNOWN
│    Retaining 731.8 kB in 13210 objects
│    ↓ BrowserMenuController.menuCandidates
│                            ~~~~~~~~~~~~~~
├─ java.util.ArrayList instance
│    Leaking: UNKNOWN
│    Retaining 731.2 kB in 13190 objects
│    ↓ ArrayList[0]
│               ~~~
├─ mozilla.components.concept.menu.candidate.TextMenuCandidate instance
│    Leaking: UNKNOWN
│    Retaining 771 B in 22 objects
│    ↓ TextMenuCandidate.onClick
│                        ~~~~~~~
├─ mozilla.components.ui.tabcounter.TabCounterMenu$$ExternalSyntheticLambda3 instance
│    Leaking: UNKNOWN
│    Retaining 12 B in 1 objects
│    ↓ TabCounterMenu$$ExternalSyntheticLambda3.f$0
│                                               ~~~
├─ org.mozilla.fenix.components.toolbar.DefaultToolbarIntegration$$ExternalSyntheticLambda6 instance
│    Leaking: UNKNOWN
│    Retaining 728.8 kB in 13117 objects
│    ↓ DefaultToolbarIntegration$$ExternalSyntheticLambda6.f$0
│                                                          ~~~
├─ org.mozilla.fenix.components.toolbar.DefaultToolbarIntegration instance
│    Leaking: UNKNOWN
│    Retaining 728.8 kB in 13116 objects
│    context instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ DefaultToolbarIntegration.interactor
│                                ~~~~~~~~~~
├─ org.mozilla.fenix.components.toolbar.interactor.DefaultBrowserToolbarInteractor instance
│    Leaking: UNKNOWN
│    Retaining 501 B in 18 objects
│    ↓ DefaultBrowserToolbarInteractor.browserToolbarController
│                                      ~~~~~~~~~~~~~~~~~~~~~~~~
├─ org.mozilla.fenix.components.toolbar.DefaultBrowserToolbarController instance
│    Leaking: UNKNOWN
│    Retaining 100 B in 3 objects
│    activity instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ DefaultBrowserToolbarController.navController
│                                      ~~~~~~~~~~~~~
├─ androidx.navigation.NavHostController instance
│    Leaking: UNKNOWN
│    Retaining 272.4 kB in 5270 objects
│    activity instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    context instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ NavController.navigatorState
│                    ~~~~~~~~~~~~~~
├─ java.util.LinkedHashMap instance
│    Leaking: UNKNOWN
│    Retaining 253 B in 7 objects
│    ↓ LinkedHashMap[key()]
│                   ~~~~~~~
├─ androidx.navigation.fragment.FragmentNavigator instance
│    Leaking: UNKNOWN
│    Retaining 193 B in 7 objects
│    context instance of org.mozilla.fenix.HomeActivity with mDestroyed = true
│    ↓ FragmentNavigator.fragmentManager
│                        ~~~~~~~~~~~~~~~
├─ androidx.fragment.app.FragmentManagerImpl instance
│    Leaking: UNKNOWN
│    Retaining 195.1 kB in 3271 objects
│    ↓ FragmentManager.mFragmentStore
│                      ~~~~~~~~~~~~~~
├─ androidx.fragment.app.FragmentStore instance
│    Leaking: UNKNOWN
│    Retaining 189.8 kB in 3074 objects
│    ↓ FragmentStore.mAdded
│                    ~~~~~~
├─ java.util.ArrayList instance
│    Leaking: UNKNOWN
│    Retaining 189.5 kB in 3065 objects
│    ↓ ArrayList[1]
│               ~~~
╰→ org.mozilla.fenix.search.SearchDialogFragment instance
​     Leaking: YES (ObjectWatcher was watching this because org.mozilla.fenix.search.SearchDialogFragment received Fragment#onDestroy() callback. Conflicts with Fragment.mLifecycleRegistry.state is INITIALIZED)
​     Retaining 189.4 kB in 3063 objects
​     key = b2e5f7ba-b2b1-4c22-a8e8-0dde39a38e37
​     watchDurationMillis = 8032
​     retainedDurationMillis = 3019
====================================

The severity field is not set for this bug.
:royang, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(royang)
Severity: -- → S2
Flags: needinfo?(royang)
You need to log in before you can comment on or make changes to this bug.