Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible memory leak #174

Open
hossain-khan opened this issue Jul 4, 2020 · 1 comment
Open

Possible memory leak #174

hossain-khan opened this issue Jul 4, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@hossain-khan
Copy link
Owner

hossain-khan commented Jul 4, 2020

┬───
│ 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 hossain-khan added the bug Something isn't working label Jul 4, 2020
@hossain-khan hossain-khan added this to To do in Incidents Project via automation Jul 4, 2020
Incidents Project automation moved this from To do to Done Jul 4, 2020
@hossain-khan hossain-khan reopened this Jul 4, 2020
Incidents Project automation moved this from Done to In progress Jul 4, 2020
@hossain-khan
Copy link
Owner Author

 ====================================
 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
 ====================================

@hossain-khan hossain-khan added this to the v3.0 milestone Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Incidents Project
  
In progress
Development

No branches or pull requests

1 participant