hossain-khan / android-police-brutality-incidents

2020PB Android client app for https://github.com/2020PB/police-brutality (Repository containing evidence of police brutality during the 2020 George Floyd protests)
https://github.com/2020PB/police-brutality
MIT License
5 stars 1 forks source link

Possible memory leak #174

Open hossain-khan opened 4 years ago

hossain-khan commented 4 years ago
┬───
│ GC Root: Local variable in native code
│
├─ com.google.android.gms.measurement.internal.zzfz instance
│    Leaking: NO (MainActivity↓ is not leaking)
│    Thread name: 'Measurement Worker'
│    ↓ zzfz.zzd
├─ com.google.android.gms.measurement.internal.zzfv instance
│    Leaking: NO (MainActivity↓ is not leaking)
│    ↓ zzfv.zzy
├─ com.google.android.gms.measurement.internal.zzfy instance
│    Leaking: NO (MainActivity↓ is not leaking)
│    ↓ zzfy.zzq
├─ com.google.android.gms.measurement.internal.zzii instance
│    Leaking: NO (MainActivity↓ is not leaking)
│    ↓ zzii.zze
├─ com.blacklivesmatter.policebrutality.MainActivity instance
│    Leaking: NO (NavHostFragment↓ is not leaking and Activity#mDestroyed is false)
│    ↓ MainActivity.mFragments
├─ androidx.fragment.app.FragmentController instance
│    Leaking: NO (NavHostFragment↓ is not leaking)
│    ↓ FragmentController.mHost
├─ androidx.fragment.app.FragmentActivity$HostCallbacks instance
│    Leaking: NO (NavHostFragment↓ is not leaking)
│    ↓ FragmentActivity$HostCallbacks.mFragmentManager
├─ androidx.fragment.app.FragmentManagerImpl instance
│    Leaking: NO (NavHostFragment↓ is not leaking)
│    ↓ FragmentManagerImpl.mPrimaryNav
├─ androidx.navigation.fragment.NavHostFragment instance
│    Leaking: NO (LocationFragment↓ is not leaking and Fragment#mFragmentManager is not null)
│    ↓ NavHostFragment.mChildFragmentManager
├─ androidx.fragment.app.FragmentManagerImpl instance
│    Leaking: NO (LocationFragment↓ is not leaking)
│    ↓ FragmentManagerImpl.mFragmentStore
├─ androidx.fragment.app.FragmentStore instance
│    Leaking: NO (LocationFragment↓ is not leaking)
│    ↓ FragmentStore.mActive
├─ java.util.HashMap instance
│    Leaking: NO (LocationFragment↓ is not leaking)
│    ↓ HashMap.table
├─ java.util.HashMap$Node[] array
│    Leaking: NO (LocationFragment↓ is not leaking)
│    ↓ HashMap$Node[].[1]
├─ java.util.HashMap$Node instance
│    Leaking: NO (LocationFragment↓ is not leaking)
│    ↓ HashMap$Node.value
├─ androidx.fragment.app.FragmentStateManager instance
│    Leaking: NO (LocationFragment↓ is not leaking)
│    ↓ FragmentStateManager.mFragment
├─ com.blacklivesmatter.policebrutality.ui.incidentlocations.LocationFragment instance
│    Leaking: NO (Fragment#mFragmentManager is not null)
│    ↓ LocationFragment.viewDataBinding
│                       ~~~~~~~~~~~~~~~
├─ com.blacklivesmatter.policebrutality.databinding.FragmentIncidentLocationsBindingImpl instance
│    Leaking: UNKNOWN
│    ↓ FragmentIncidentLocationsBindingImpl.coordinator
│                                           ~~~~~~~~~~~
╰→ androidx.coordinatorlayout.widget.CoordinatorLayout instance
​     Leaking: YES (ObjectWatcher was watching this because com.blacklivesmatter.policebrutality.ui.incidentlocations.LocationFragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks))
​     key = 720c615a-e2ef-4aa6-9ea7-38f2589310be
​     watchDurationMillis = 16342
​     retainedDurationMillis = 11340
​     mContext instance of dagger.hilt.android.internal.managers.ViewComponentManager$FragmentContextWrapper, wrapping activity com.blacklivesmatter.policebrutality.MainActivity with mDestroyed = false
​     View#mParent is null
​     View#mAttachInfo is null (view detached)
​     View.mID = R.id.coordinator
​     View.mWindowAttachCount = 1

METADATA

Build.VERSION.SDK_INT: 30
Build.MANUFACTURER: Google
LeakCanary version: 2.4
App process name: com.blacklivesmatter.policebrutality
Analysis duration: 9078 ms
hossain-khan commented 4 years ago
 ====================================
 HEAP ANALYSIS RESULT
 ====================================
 1 APPLICATION LEAKS
 References underlined with "~~~" are likely causes.
 Learn more at https://squ.re/leaks.
 1857 bytes retained by leaking objects
 Signature: 2c79b05398bb34a25217d6735a1974c1d368db1
 ┬───
 │ 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 (ViewRootImpl↓ is not leaking and InputMethodManager is a singleton)
 │    ↓ InputMethodManager.mCurRootView
 ├─ android.view.ViewRootImpl instance
 │    Leaking: NO (PhoneWindow↓ is not leaking and ViewRootImpl#mView is not null)
 │    ↓ ViewRootImpl.mContext
 ├─ com.android.internal.policy.DecorContext instance
 │    Leaking: NO (PhoneWindow↓ is not leaking)
 │    DecorContext wraps an Activity with Activity.mDestroyed false
 │    ↓ DecorContext.mPhoneWindow
 ├─ com.android.internal.policy.PhoneWindow instance
 │    Leaking: NO (Window#mDestroyed is false)
 │    ↓ PhoneWindow.mCallback
 │                  ~~~~~~~~~
 ├─ androidx.appcompat.app.ToolbarActionBar$ToolbarCallbackWrapper instance
 │    Leaking: UNKNOWN
 │    ↓ ToolbarActionBar$ToolbarCallbackWrapper.this$0
 │                                              ~~~~~~
 ├─ androidx.appcompat.app.ToolbarActionBar instance
 │    Leaking: UNKNOWN
 │    ↓ ToolbarActionBar.mDecorToolbar
 │                       ~~~~~~~~~~~~~
 ├─ androidx.appcompat.widget.ToolbarWidgetWrapper instance
 │    Leaking: UNKNOWN
 │    ↓ ToolbarWidgetWrapper.mToolbar
 │                           ~~~~~~~~
 ├─ androidx.appcompat.widget.Toolbar instance
 │    Leaking: YES (View detached and has parent)
 │    mContext instance of android.view.ContextThemeWrapper, wrapping activity com.blacklivesmatter.policebrutality.MainActivity with mDestroyed = false
 │    View#mParent is set
 │    View#mAttachInfo is null (view detached)
 │    View.mID = R.id.toolbar
 │    View.mWindowAttachCount = 1
 │    ↓ Toolbar.mParent
 ├─ com.google.android.material.appbar.CollapsingToolbarLayout instance
 │    Leaking: YES (Toolbar↑ is leaking and View detached and has parent)
 │    mContext instance of android.view.ContextThemeWrapper, wrapping activity com.blacklivesmatter.policebrutality.MainActivity with mDestroyed = false
 │    View#mParent is set
 │    View#mAttachInfo is null (view detached)
 │    View.mID = R.id.collapsingtoolbarlayout
 │    View.mWindowAttachCount = 1
 │    ↓ CollapsingToolbarLayout.mParent
 ├─ com.google.android.material.appbar.AppBarLayout instance
 │    Leaking: YES (CollapsingToolbarLayout↑ is leaking and View detached and has parent)
 │    mContext instance of android.view.ContextThemeWrapper, wrapping activity com.blacklivesmatter.policebrutality.MainActivity with mDestroyed = false
 │    View#mParent is set
 │    View#mAttachInfo is null (view detached)
 │    View.mID = R.id.appbarlayout
 │    View.mWindowAttachCount = 1
 │    ↓ AppBarLayout.mParent
 ╰→ androidx.coordinatorlayout.widget.CoordinatorLayout instance
 ​     Leaking: YES (ObjectWatcher was watching this because com.blacklivesmatter.policebrutality.ui.incidentlocations.LocationFragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks))
 ​     key = 3346b192-20a6-4562-918c-2cd9f06231ec
 ​     watchDurationMillis = 22938
 ​     retainedDurationMillis = 17937
 ​     mContext instance of dagger.hilt.android.internal.managers.ViewComponentManager$FragmentContextWrapper, wrapping activity com.blacklivesmatter.policebrutality.MainActivity with mDestroyed = false
 ​     View#mParent is null
 ​     View#mAttachInfo is null (view detached)
 ​     View.mID = R.id.coordinator
 ​     View.mWindowAttachCount = 1
 ====================================
 0 LIBRARY LEAKS
 A Library Leak is a leak caused by a known bug in 3rd party code that you do not have control over.
 See https://square.github.io/leakcanary/fundamentals-how-leakcanary-works/#4-categorizing-leaks
 ====================================
 METADATA
 Please include this in bug reports and Stack Overflow questions.
 Build.VERSION.SDK_INT: 30
 Build.MANUFACTURER: Google
 LeakCanary version: 2.4
 App process name: com.blacklivesmatter.policebrutality
 Analysis duration: 8503 ms
 Heap dump file path: /storage/emulated/0/Download/leakcanary-com.blacklivesmatter.policebrutality/2020-07-05_09-32-22_549.hprof
 Heap dump timestamp: 1593955955131
 ====================================