TeamAmaze / TeamAmaze/AmazeFileManager
FrameLayout leak while decompressing
Open
Nobody has claimed this yet.
Area-CodeHealth
Issue-Bug
Issue-Easy (good first issue)
Issue-Task (low)
- Dominant language
- Kotlin
- Stars
- 6.4k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
9841 bytes retained by leaking objects
Signature: a7349cf4f52dad54814618eed9bfd3ca1d97bfac
┬───
│ GC Root: Input or output parameters in native code
│
├─ android.os.FileObserver$ObserverThread instance
│ Leaking: NO (PathClassLoader↓ is not leaking)
│ Thread name: 'FileObserver'
│ ↓ Thread.contextClassLoader
├─ dalvik.system.PathClassLoader instance
│ Leaking: NO (InternalLeakCanary↓ is not leaking and A ClassLoader is never
│ leaking)
│ ↓ ClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│ Leaking: NO (InternalLeakCanary↓ is not leaking)
│ ↓ Object[].[4728]
├─ leakcanary.internal.InternalLeakCanary class
│ Leaking: NO (MainActivity↓ is not leaking and a class is never leaking)
│ ↓ static InternalLeakCanary.resumedActivity
├─ com.amaze.filemanager.ui.activities.MainActivity instance
│ Leaking: NO (AppBarLayout↓ is not leaking and Activity#mDestroyed is false)
│ mainActivity instance of com.amaze.filemanager.ui.activities.MainActivity
│ with mDestroyed = false
│ mApplication instance of com.amaze.filemanager.application.AppConfig
│ mBase instance of androidx.appcompat.view.ContextThemeWrapper
│ ↓ MainActivity.appBarLayout
├─ com.google.android.material.appbar.AppBarLayout instance
│ Leaking: NO (View attached)
│ View is part of a window view hierarchy
│ View.mAttachInfo is not null (view attached)
│ View.mID = R.id.lin
│ View.mWindowAttachCount = 1
│ mContext instance of com.amaze.filemanager.ui.activities.MainActivity with
│ mDestroyed = false
│ ↓ AppBarLayout.listeners
│ ~~~~~~~~~
├─ java.util.ArrayList instance
│ Leaking: UNKNOWN
│ Retaining 273.1 kB in 2740 objects
│ ↓ ArrayList.elementData
│ ~~~~~~~~~~~
├─ java.lang.Object[] array
│ Leaking: UNKNOWN
│ Retaining 273.1 kB in 2739 objects
│ ↓ Object[].[11]
│ ~~~~
├─ com.amaze.filemanager.ui.fragments.
│ -$$Lambda$CompressedExplorerFragment$PinjQafs8utC8DDNULgQ-aoHTmQ instance
│ Leaking: UNKNOWN
│ Retaining 12 B in 1 objects
│ ↓ -$$Lambda$CompressedExplorerFragment$PinjQafs8utC8DDNULgQ-aoHTmQ.f$0
│ ~~~
├─ com.amaze.filemanager.ui.views.FastScroller instance
│ Leaking: UNKNOWN
│ Retaining 272.4 kB in 2698 objects
│ View not part of a window view hierarchy
│ View.mAttachInfo is null (view detached)
│ View.mID = R.id.fastscroll
│ View.mWindowAttachCount = 1
│ mContext instance of com.amaze.filemanager.ui.activities.MainActivity with
│ mDestroyed = false
│ ↓ View.mParent
│ ~~~~~~~
╰→ android.widget.FrameLayout instance
Leaking: YES (ObjectWatcher was watching this because com.amaze.
filemanager.ui.fragments.CompressedExplorerFragment received
Fragment#onDestroyView() callback (references to its views should be
cleared to prevent leaks))
Retaining 9.8 kB in 146 objects
key = 68c543b6-d797-4f3c-91df-1c4b36c8cea2
watchDurationMillis = 416197
retainedDurationMillis = 411197
View not part of a window view hierarchy
View.mAttachInfo is null (view detached)
View.mWindowAttachCount = 1
mContext instance of com.amaze.filemanager.ui.activities.MainActivity
with mDestroyed = false
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CompressedExplorerFragment and its onDestroyView lifecycle, then trace the listener path from AppBarLayout through FastScroller to the detached FrameLayout shown in the LeakCanary report. Reproduce the decompression and view-destruction flow with LeakCanary; done means the FrameLayout is no longer retained after onDestroyView.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100