Open Bug 1807340 Opened 3 years ago Updated 2 years ago

HomeFragment leak when changing language

Categories

(Firefox for Android :: Performance, defect)

All
Android
defect

Tracking

()

Performance Impact none

People

(Reporter: cpeterson, Unassigned)

Details

From github: https://github.com/mozilla-mobile/fenix/issues/22023.

Steps to reproduce

  1. go to the settings and change the language
  2. press the back arrow in the header bar

Expected behavior

No leak.

Actual behavior

┬───
│ GC Root: Global variable in native code
│
├─ dalvik.system.PathClassLoader instance
│    Leaking: NO (InternalLeakCanary↓ is not leaking and A ClassLoader is never leaking)
│    ↓ PathClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│    Leaking: NO (InternalLeakCanary↓ is not leaking)
│    ↓ Object[].[12]
├─ leakcanary.internal.InternalLeakCanary class
│    Leaking: NO (HomeActivity↓ is not leaking and a class is never leaking)
│    ↓ static InternalLeakCanary.resumedActivity
├─ org.mozilla.fenix.HomeActivity instance
│    Leaking: NO (NavHostFragment↓ is not leaking and Activity#mDestroyed is false)
│    ↓ HomeActivity.navHost$delegate
├─ kotlin.SynchronizedLazyImpl instance
│    Leaking: NO (NavHostFragment↓ is not leaking)
│    ↓ SynchronizedLazyImpl._value
├─ androidx.navigation.fragment.NavHostFragment instance
│    Leaking: NO (Fragment#mFragmentManager is not null)
│    ↓ NavHostFragment.mChildFragmentManager
│                      ~~~~~~~~~~~~~~~~~~~~~
├─ androidx.fragment.app.FragmentManagerImpl instance
│    Leaking: UNKNOWN
│    ↓ FragmentManagerImpl.mNonConfig
│                          ~~~~~~~~~~
├─ androidx.fragment.app.FragmentManagerViewModel instance
│    Leaking: UNKNOWN
│    ↓ FragmentManagerViewModel.mViewModelStores
│                               ~~~~~~~~~~~~~~~~
├─ java.util.HashMap instance
│    Leaking: UNKNOWN
│    ↓ HashMap.table
│              ~~~~~
├─ java.util.HashMap$Node[] array
│    Leaking: UNKNOWN
│    ↓ HashMap$Node[].[1]
│                     ~~~
├─ java.util.HashMap$Node instance
│    Leaking: UNKNOWN
│    ↓ HashMap$Node.value
│                   ~~~~~
├─ androidx.lifecycle.ViewModelStore instance
│    Leaking: UNKNOWN
│    ↓ ViewModelStore.mMap
│                     ~~~~
├─ java.util.HashMap instance
│    Leaking: UNKNOWN
│    ↓ HashMap.table
│              ~~~~~
├─ java.util.HashMap$Node[] array
│    Leaking: UNKNOWN
│    ↓ HashMap$Node[].[1]
│                     ~~~
├─ java.util.HashMap$Node instance
│    Leaking: UNKNOWN
│    ↓ HashMap$Node.value
│                   ~~~~~
├─ org.mozilla.fenix.components.StoreProvider instance
│    Leaking: UNKNOWN
│    ↓ StoreProvider.store
│                    ~~~~~
├─ org.mozilla.fenix.home.HomeFragmentStore instance
│    Leaking: UNKNOWN
│    ↓ HomeFragmentStore.reducerChainBuilder
│                        ~~~~~~~~~~~~~~~~~~~
├─ mozilla.components.lib.state.internal.ReducerChainBuilder instance
│    Leaking: UNKNOWN
│    ↓ ReducerChainBuilder.middleware
│                          ~~~~~~~~~~
├─ java.util.Collections$SingletonList instance
│    Leaking: UNKNOWN
│    ↓ Collections$SingletonList.element
│                                ~~~~~~~
├─ org.mozilla.fenix.home.PocketUpdatesMiddleware instance
│    Leaking: UNKNOWN
│    ↓ PocketUpdatesMiddleware.coroutineScope
│                              ~~~~~~~~~~~~~~
├─ androidx.lifecycle.LifecycleCoroutineScopeImpl instance
│    Leaking: UNKNOWN
│    ↓ LifecycleCoroutineScopeImpl.lifecycle
│                                  ~~~~~~~~~
├─ androidx.lifecycle.LifecycleRegistry instance
│    Leaking: UNKNOWN
│    ↓ LifecycleRegistry.mObserverMap
│                        ~~~~~~~~~~~~
├─ androidx.arch.core.internal.FastSafeIterableMap instance
│    Leaking: UNKNOWN
│    ↓ FastSafeIterableMap.mStart
│                          ~~~~~~
├─ androidx.arch.core.internal.SafeIterableMap$Entry instance
│    Leaking: UNKNOWN
│    ↓ SafeIterableMap$Entry.mKey
│                            ~~~~
├─ androidx.fragment.app.Fragment$5 instance
│    Leaking: UNKNOWN
│    Anonymous class implementing androidx.lifecycle.LifecycleEventObserver
│    ↓ Fragment$5.this$0
│                 ~~~~~~
╰→ org.mozilla.fenix.home.HomeFragment instance
​     Leaking: YES (ObjectWatcher was watching this because org.mozilla.fenix.home.HomeFragment received Fragment#onDestroy() callback and Fragment#mFragmentManager is null)
​     key = 9aa3ab3c-8da7-4733-8902-be7f14f1dc18
​     watchDurationMillis = 5240
​     retainedDurationMillis = 239

METADATA

Build.VERSION.SDK_INT: 30
Build.MANUFACTURER: OnePlus
LeakCanary version: 2.4
App process name: org.mozilla.fenix.debug
Analysis duration: 9769 ms

Device information

  • Android device: OnePlus 7T Pro McLaren Edition, Android 11
  • Fenix version: main branch revision f5431fbe01227cc3aedd460356d5d6bdd6f70701

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(cpeterson)
Flags: needinfo?(cpeterson)
Performance Impact: --- → none
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.