Leak in TorConnectionAssistFragment
🐞 Bug Report
┬───
│ GC Root: Global variable in native code
│
├─ org.mozilla.geckoview.GeckoRuntime class
│ Leaking: NO (HomeActivity↓ is not leaking and a class is never leaking)
│ ↓ static GeckoRuntime.sRuntime
├─ org.mozilla.geckoview.GeckoRuntime instance
│ Leaking: NO (HomeActivity↓ is not leaking)
│ ↓ GeckoRuntime.mServiceWorkerDelegate
├─ mozilla.components.browser.engine.gecko.serviceworker.
│ GeckoServiceWorkerDelegate instance
│ Leaking: NO (HomeActivity↓ is not leaking)
│ ↓ GeckoServiceWorkerDelegate.delegate
├─ org.mozilla.fenix.ServiceWorkerSupportFeature instance
│ Leaking: NO (HomeActivity↓ is not leaking)
│ homeActivity instance of org.mozilla.fenix.HomeActivity with mDestroyed =
│ false
│ ↓ ServiceWorkerSupportFeature.homeActivity
├─ org.mozilla.fenix.HomeActivity instance
│ Leaking: NO (TorConnectionAssistFragment↓ is not leaking and
│ Activity#mDestroyed is false)
│ mApplication instance of org.mozilla.fenix.DebugFenixApplication
│ mBase instance of androidx.appcompat.view.ContextThemeWrapper
│ ↓ ComponentActivity.onConfigurationChangedListeners
├─ java.util.concurrent.CopyOnWriteArrayList instance
│ Leaking: NO (TorConnectionAssistFragment↓ is not leaking)
│ ↓ CopyOnWriteArrayList[3]
├─ androidx.fragment.app.FragmentManager$$ExternalSyntheticLambda0 instance
│ Leaking: NO (TorConnectionAssistFragment↓ is not leaking)
│ ↓ FragmentManager$$ExternalSyntheticLambda0.f$0
├─ androidx.fragment.app.FragmentManagerImpl instance
│ Leaking: NO (TorConnectionAssistFragment↓ is not leaking)
│ ↓ FragmentManager.mParent
├─ org.mozilla.fenix.tor.TorConnectionAssistFragment instance
│ Leaking: NO (Fragment.mLifecycleRegistry.state is CREATED)
│ Fragment.mTag = 2f0d7771-2588-4b0b-8622-aa7412825e86
│ ↓ TorConnectionAssistFragment._binding
│ ~~~~~~~~
├─ org.mozilla.fenix.databinding.FragmentTorConnectionAssistBinding instance
│ Leaking: UNKNOWN
│ Retaining 245.2 kB in 2983 objects
│ ↓ FragmentTorConnectionAssistBinding.rootView
│ ~~~~~~~~
╰→ androidx.constraintlayout.widget.ConstraintLayout instance
Leaking: YES (ObjectWatcher was watching this because org.mozilla.fenix.
tor.TorConnectionAssistFragment received Fragment#onDestroyView()
callback (references to its views should be cleared to prevent leaks))
Retaining 4.3 kB in 87 objects
key = 4bb9f623-f454-4c73-980b-94e12d82a846
watchDurationMillis = 49898
retainedDurationMillis = 44897
View not part of a window view hierarchy
View.mAttachInfo is null (view detached)
View.mWindowAttachCount = 1
mContext instance of org.mozilla.fenix.HomeActivity with mDestroyed =
false
METADATA
Build.VERSION.SDK_INT: 36
Build.MANUFACTURER: Google
LeakCanary version: 2.14
App process name: org.torproject.torbrowser_debug
Class count: 43558
Instance count: 272077
Primitive array count: 198295
Object array count: 42359
Thread count: 58
Heap total bytes: 38224519
Bitmap count: 21
Bitmap total bytes: 626105
Large bitmap count: 0
Large bitmap total bytes: 0
Db 1: open /data/user/0/org.torproject.
torbrowser_debug/databases/recently_closed_tabs
Db 2: open /data/user/0/org.torproject.torbrowser_debug/no_backup/androidx.work.
workdb
Db 3: open /data/user/0/org.torproject.
torbrowser_debug/databases/mozac_downloads_database
Db 4: open /data/user/0/org.torproject.torbrowser_debug/databases/crashes
Db 5: open /data/user/0/org.torproject.torbrowser_debug/databases/manifests
Db 6: open /data/user/0/org.torproject.torbrowser_debug/databases/top_sites
Db 7: open /data/user/0/org.torproject.
torbrowser_debug/databases/tab_collections
Stats: LruCache[maxSize=3000,hits=130436,misses=252504,hitRate=34%]
RandomAccess[bytes=12664498,reads=252504,travel=114971627624,range=46790490,size
=57848018]
Analysis duration: 9880 ms
Reproduction steps
Launch and bootstrap app in debug mode