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

Session Replay for Compose leak #3915

Open
romtsn opened this issue Nov 20, 2024 · 0 comments · May be fixed by #3985
Open

Session Replay for Compose leak #3915

romtsn opened this issue Nov 20, 2024 · 0 comments · May be fixed by #3985
Assignees

Comments

@romtsn
Copy link
Member

romtsn commented Nov 20, 2024

Integration

sentry-android

Build System

Gradle

AGP Version

...

Proguard

Disabled

Version

7.18.0

Steps to Reproduce

Caught by LeakCanary

                              ====================================
  HEAP ANALYSIS RESULT
  ====================================
  1 APPLICATION LEAKS
  
  References underlined with "~~~" are likely causes.
  Learn more at https://squ.re/leaks.
  
  76166 bytes retained by leaking objects
  Signature: b3a97afc793268893ebb51b45a46b38ebc0d3d09
  ┬───
  │ GC Root: Thread object
  │
  ├─ android.net.ConnectivityThread instance
  │    Leaking: NO (PathClassLoader↓ is not leaking)
  │    Thread name: 'ConnectivityThread'
  │    ↓ Thread.contextClassLoader
  ├─ dalvik.system.PathClassLoader instance
  │    Leaking: NO (ComposeViewHierarchyNode↓ is not leaking and A ClassLoader is never leaking)
  │    ↓ ClassLoader.runtimeInternalObjects
  ├─ java.lang.Object[] array
  │    Leaking: NO (ComposeViewHierarchyNode↓ is not leaking)
  │    ↓ Object[1344]
  ├─ io.sentry.android.replay.viewhierarchy.ComposeViewHierarchyNode class
  │    Leaking: NO (a class is never leaking)
  │    ↓ static ComposeViewHierarchyNode._rootCoordinates
  │                                      ~~~~~~~~~~~~~~~~
  ├─ androidx.compose.ui.node.InnerNodeCoordinator instance
  │    Leaking: UNKNOWN
  │    Retaining 102.2 kB in 1973 objects
  │    ↓ NodeCoordinator.layoutNode
  │                      ~~~~~~~~~~
  ├─ androidx.compose.ui.node.LayoutNode instance
  │    Leaking: UNKNOWN
  │    Retaining 1.1 kB in 36 objects
  │    ↓ LayoutNode.owner
  │                 ~~~~~
  ├─ androidx.compose.ui.platform.AndroidComposeView instance
  │    Leaking: YES (View.mContext references a destroyed activity)
  │    Retaining 76.2 kB in 1303 objects
  │    View is part of a window view hierarchy
  │    View.mAttachInfo is null (view detached)
  │    View.mWindowAttachCount = 1
  │    mContext instance of io.sentry.samples.android.SplashActivity with mDestroyed = true
  │    ↓ View.mContext
  ╰→ io.sentry.samples.android.SplashActivity instance
  ​     Leaking: YES (ObjectWatcher was watching this because io.sentry.samples.android.SplashActivity received
  ​     Activity#onDestroy() callback and Activity#mDestroyed is true)
  ​     Retaining 15.2 kB in 324 objects
  ​     key = dbf099f6-d3e4-465c-b17f-7ba3dfa82311
  ​     watchDurationMillis = 16002
  ​     retainedDurationMillis = 11001
  ​     mApplication instance of io.sentry.samples.android.MyApplication
  ​     mBase instance of androidx.appcompat.view.ContextThemeWrapper
  ====================================

Expected Result

Don't leak

Actual Result

Leaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

1 participant