Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug][LeakCanary] OpenInAppOnboardingObserver leaks SwipeGestureLayout #14903

Closed
cadeyrn opened this issue Sep 9, 2020 · 2 comments
Closed
Assignees
Labels
🐞 bug Crashes, Something isn't working, .. E2 Estimation Point: easy, half a day to 2 days eng:qa:verified QA Verified

Comments

@cadeyrn
Copy link
Contributor

cadeyrn commented Sep 9, 2020

Steps to reproduce

  1. open a website
  2. from the browser screen -> three dot menu -> Settings
  3. Wait a few seconds for the leak to be detected by LeakCanary

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[].[782]
├─ 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 (Activity#mDestroyed is false)
│    ↓ HomeActivity.mLifecycleRegistry
│                   ~~~~~~~~~~~~~~~~~~
├─ androidx.lifecycle.LifecycleRegistry instance
│    Leaking: UNKNOWN
│    ↓ LifecycleRegistry.mObserverMap
│                        ~~~~~~~~~~~~
├─ androidx.arch.core.internal.FastSafeIterableMap instance
│    Leaking: UNKNOWN
│    ↓ FastSafeIterableMap.mEnd
│                          ~~~~
├─ androidx.arch.core.internal.SafeIterableMap$Entry instance
│    Leaking: UNKNOWN
│    ↓ SafeIterableMap$Entry.mKey
│                            ~~~~
├─ mozilla.components.support.base.observer.ObserverRegistry$LifecycleBoundObserver instance
│    Leaking: UNKNOWN
│    ↓ ObserverRegistry$LifecycleBoundObserver.registry
│                                              ~~~~~~~~
├─ mozilla.components.support.base.observer.ObserverRegistry instance
│    Leaking: UNKNOWN
│    ↓ ObserverRegistry.observers
│                       ~~~~~~~~~
├─ java.util.LinkedHashSet instance
│    Leaking: UNKNOWN
│    ↓ LinkedHashSet.map
│                    ~~~
├─ java.util.LinkedHashMap instance
│    Leaking: UNKNOWN
│    ↓ LinkedHashMap.tail
│                    ~~~~
├─ java.util.LinkedHashMap$LinkedHashMapEntry instance
│    Leaking: UNKNOWN
│    ↓ LinkedHashMap$LinkedHashMapEntry.key
│                                       ~~~
├─ org.mozilla.fenix.browser.OpenInAppOnboardingObserver instance
│    Leaking: UNKNOWN
│    ↓ OpenInAppOnboardingObserver.container
│                                  ~~~~~~~~~
├─ androidx.coordinatorlayout.widget.CoordinatorLayout instance
│    Leaking: YES (View detached and has parent)
│    mContext instance of org.mozilla.fenix.HomeActivity with mDestroyed = false
│    View#mParent is set
│    View#mAttachInfo is null (view detached)
│    View.mID = R.id.browserLayout
│    View.mWindowAttachCount = 1
│    ↓ CoordinatorLayout.mParent
├─ androidx.constraintlayout.widget.ConstraintLayout instance
│    Leaking: YES (CoordinatorLayout↑ is leaking and View detached and has parent)
│    mContext instance of org.mozilla.fenix.HomeActivity with mDestroyed = false
│    View#mParent is set
│    View#mAttachInfo is null (view detached)
│    View.mID = R.id.browserWindow
│    View.mWindowAttachCount = 1
│    ↓ ConstraintLayout.mParent
╰→ org.mozilla.fenix.browser.SwipeGestureLayout instance
​     Leaking: YES (ObjectWatcher was watching this because org.mozilla.fenix.browser.BrowserFragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks))
​     key = e96e696d-49d4-42ed-aace-cbf5201e5c2e
​     watchDurationMillis = 8298
​     retainedDurationMillis = 3297
​     mContext instance of org.mozilla.fenix.HomeActivity with mDestroyed = false
​     View#mParent is null
​     View#mAttachInfo is null (view detached)
​     View.mID = R.id.gestureLayout
​     View.mWindowAttachCount = 1

METADATA

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

/cc @Mugurell

Device information

  • Android device: OnePlus 7T Pro McLaren / Oxygen OS 10.0.10 (Android 10)
  • Fenix version: master branch revision 4de80a0

┆Issue is synchronized with this Jira Task

@cadeyrn cadeyrn added the 🐞 bug Crashes, Something isn't working, .. label Sep 9, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Sep 9, 2020
@cadeyrn cadeyrn changed the title [Bug][LeakCanary] leak when disabling pull to refresh [Bug][LeakCanary] leak when disabling gestures Sep 9, 2020
@Mugurell Mugurell changed the title [Bug][LeakCanary] leak when disabling gestures [Bug][LeakCanary] OpenInAppOnboardingObserver leaks SwipeGestureLayout Sep 10, 2020
@Mugurell
Copy link
Contributor

Mugurell commented Sep 10, 2020

Thank you @cadeyrn !
This seems like an a bit older issue, not related to the recent gesture tickets so I've edited the title.
Will work towards a patch to fix it.

@Mugurell Mugurell self-assigned this Sep 10, 2020
@Mugurell Mugurell added hershey E2 Estimation Point: easy, half a day to 2 days and removed needs:triage Issue needs triage labels Sep 10, 2020
interfect pushed a commit to fork-maintainers/iceraven-browser that referenced this issue Sep 11, 2020
@Mugurell Mugurell added the eng:qa:needed QA Needed label Sep 11, 2020
@sv-ohorvath
Copy link
Contributor

Verified on the debug version from 9/11 and this is now fixed.

@sv-ohorvath sv-ohorvath added eng:qa:verified QA Verified and removed eng:qa:needed QA Needed labels Sep 11, 2020
abhijitvalluri pushed a commit to abhijitvalluri/firefox2 that referenced this issue Sep 11, 2020
abhijitvalluri pushed a commit to fork-maintainers/iceraven-browser that referenced this issue Sep 13, 2020
abhijitvalluri added a commit to fork-maintainers/iceraven-browser that referenced this issue Sep 13, 2020
abhijitvalluri added a commit to fork-maintainers/iceraven-browser that referenced this issue Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. E2 Estimation Point: easy, half a day to 2 days eng:qa:verified QA Verified
Projects
None yet
Development

No branches or pull requests

3 participants