GleapSDK / Flutter-SDK

Other
3 stars 2 forks source link

gleap_sdk: ^7.0.14 - 112691 bytes retained by leaking objects #4

Closed astraube closed 8 months ago

astraube commented 1 year ago

When this memory leak happens, it automatically opens a screen in the application with the writing "Hi".

Then the gleap SDK directs the user to the following page: open image

==================================== HEAP ANALYSIS RESULT

1 APPLICATION LEAKS

References underlined with "~~~" are likely causes.
Learn more at https://squ.re/leaks.

112691 bytes retained by leaking objects
Signature: 2c71cac97efab92fdb2b17349924f8b22ebd
┬───
│ GC Root: Local variable in native code
│
├─ J40 instance
│    Leaking: NO (PathClassLoader↓ is not leaking)
│    Thread name: 'CleanupReference'
│    ↓ Thread.contextClassLoader
├─ dalvik.system.PathClassLoader instance
│    Leaking: NO (GleapConfig↓ is not leaking and A ClassLoader is never leaking)
│    ↓ ClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│    Leaking: NO (GleapConfig↓ is not leaking)
│    ↓ Object[].[1423]
├─ io.gleap.GleapConfig class
│    Leaking: NO (a class is never leaking)
│    ↓ static GleapConfig.instance
│                         ~~~~~~~~
├─ io.gleap.GleapConfig instance
│    Leaking: UNKNOWN
│    Retaining 191,0 kB in 3864 objects
│    ↓ GleapConfig.callCloseCallback
│                  ~~~~~~~~~~~~~~~~~
├─ io.gleap.GleapMainActivity$2 instance
│    Leaking: UNKNOWN
│    Retaining 112,7 kB in 1834 objects
│    Anonymous class implementing io.gleap.CallCloseCallback
│    this$0 instance of io.gleap.GleapMainActivity with mDestroyed = true
│    ↓ GleapMainActivity$2.this$0
│                          ~~~~~~
╰→ io.gleap.GleapMainActivity instance
​     Leaking: YES (ObjectWatcher was watching this because io.gleap.GleapMainActivity received Activity#onDestroy()
​     callback and Activity#mDestroyed is true)
​     Retaining 112,7 kB in 1833 objects
​     key = bbd88600-f056-4051-a633-f71c1c3853db
​     watchDurationMillis = 5497
​     retainedDurationMillis = 470
​     mApplication instance of app.mottu.CustomApp
​     mBase instance of androidx.appcompat.view.ContextThemeWrapper
====================================
boehlerlukas commented 1 year ago

Hey @astraube,

thanks for sharing that bug with us. @TobiasDuelli will have a look into this.

Best, Lukas

boehlerlukas commented 8 months ago

The issue should actually be fixed in the latest versions - sorry for not updating it here in time.