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

BoardFragment UI Blocking and Memory leak #34

Open
jisungbin opened this issue Feb 27, 2022 · 0 comments
Open

BoardFragment UI Blocking and Memory leak #34

jisungbin opened this issue Feb 27, 2022 · 0 comments
Assignees
Labels
bug Something isn't working high-priority High-priority feature

Comments

@jisungbin
Copy link
Contributor

jisungbin commented Feb 27, 2022

UI Blocking

  1. 위치 조회를 onCreate 에서 바로 호출함
  2. 리사이클러뷰 여러개의 이미지 로드를 onCreate 에서 바로 호출함

Memory leak

  1. LoginActivity 에서 Activity 를 이용하여 카카오 로그인을 하고, 이후 BoardFragment 로 넘어오면서 앞에서 사용했던 Activity 에 대한 메모리 누수가 발생함
┬───
│ GC Root: Global variable in native code
│
├─ android.os.ResultReceiver$MyResultReceiver instance
│    Leaking: UNKNOWN
│    Retaining 3.5 MB in 4819 objects
│    ↓ ResultReceiver$MyResultReceiver.this$0
│                                      ~~~~~~
├─ com.kakao.sdk.auth.AuthCodeClient$resultReceiver$1 instance
│    Leaking: UNKNOWN
│    Retaining 3.5 MB in 4818 objects
│    Anonymous subclass of android.os.ResultReceiver
│    ↓ AuthCodeClient$resultReceiver$1.$callback
│                                      ~~~~~~~~~
├─ com.kakao.sdk.user.UserApiClient$loginWithKakaoTalk$1 instance
│    Leaking: UNKNOWN
│    Retaining 3.5 MB in 4816 objects
│    Anonymous subclass of kotlin.jvm.internal.Lambda
│    ↓ UserApiClient$loginWithKakaoTalk$1.$callback
│                                         ~~~~~~~~~
├─ team.dahaeng.android.data.user.repository.
│  UserRepositoryImpl$loginWithKakaoTalk$2$1 instance
│    Leaking: UNKNOWN
│    Retaining 3.5 MB in 4814 objects
│    Anonymous subclass of kotlin.jvm.internal.Lambda
│    ↓ UserRepositoryImpl$loginWithKakaoTalk$2$1.$continuation
│                                                ~~~~~~~~~~~~~
├─ kotlinx.coroutines.CancellableContinuationImpl instance
│    Leaking: UNKNOWN
│    Retaining 3.5 MB in 4813 objects
│    ↓ CancellableContinuationImpl.delegate
│                                  ~~~~~~~~
├─ kotlinx.coroutines.internal.DispatchedContinuation instance
│    Leaking: UNKNOWN
│    Retaining 1.3 kB in 30 objects
│    ↓ DispatchedContinuation.continuation
│                             ~~~~~~~~~~~~
├─ team.dahaeng.android.data.user.repository.UserRepositoryImpl$kakaoLogin$1
│  instance
│    Leaking: UNKNOWN
│    Retaining 1.2 kB in 29 objects
│    Anonymous subclass of kotlin.coroutines.jvm.internal.ContinuationImpl
│    ↓ BaseContinuationImpl.completion
│                           ~~~~~~~~~~
├─ team.dahaeng.android.domain.user.usecase.KakaoLoginUseCase$invoke$1 instance
│    Leaking: UNKNOWN
│    Retaining 196 B in 7 objects
│    Anonymous subclass of kotlin.coroutines.jvm.internal.ContinuationImpl
│    ↓ BaseContinuationImpl.completion
│                           ~~~~~~~~~~
├─ team.dahaeng.android.activity.login.LoginViewModel$login$1 instance
│    Leaking: UNKNOWN
│    Retaining 128 B in 4 objects
│    Anonymous subclass of kotlin.coroutines.jvm.internal.ContinuationImpl
│    ↓ BaseContinuationImpl.completion
│                           ~~~~~~~~~~
├─ team.dahaeng.android.activity.login.LoginActivity$onCreate$5$1 instance
│    Leaking: UNKNOWN
│    Retaining 80 B in 2 objects
│    Anonymous subclass of kotlin.coroutines.jvm.internal.SuspendLambda
│    L$0 instance of team.dahaeng.android.activity.login.LoginActivity with
│    mDestroyed = true
│    this$0 instance of team.dahaeng.android.activity.login.LoginActivity with
│    mDestroyed = true
│    ↓ LoginActivity$onCreate$5$1.L$0
│                                 ~~~
╰→ team.dahaeng.android.activity.login.LoginActivity instance
​     Leaking: YES (ObjectWatcher was watching this because team.dahaeng.
​     android.activity.login.LoginActivity received Activity#onDestroy()
​     callback and Activity#mDestroyed is true)
​     Retaining 3.5 MB in 4620 objects
​     key = 779e7682-ff6b-4f19-b880-1d2ccc4cedd3
​     watchDurationMillis = 12380
​     retainedDurationMillis = 7379
​     mApplication instance of team.dahaeng.android.DahaengAndroid
​     mBase instance of androidx.appcompat.view.ContextThemeWrapper

METADATA

Build.VERSION.SDK_INT: 30
Build.MANUFACTURER: samsung
LeakCanary version: 2.8.1
App process name: team.dahaeng.android
Stats: LruCache[maxSize=3000,hits=67267,misses=182401,hitRate=26%]
RandomAccess[bytes=17011669,reads=182401,travel=183879434998,range=52067686,size
=95606486]
Analysis duration: 17379 ms
@jisungbin jisungbin self-assigned this Feb 27, 2022
@jisungbin jisungbin added enhancement New feature or request about function high-priority High-priority feature labels Feb 27, 2022
@jisungbin jisungbin changed the title 리사이클러뷰 이미지 로드 비동기 처리 BoardFragment UI Blocking Mar 5, 2022
@jisungbin jisungbin added bug Something isn't working and removed enhancement New feature or request about function labels Mar 5, 2022
@jisungbin jisungbin changed the title BoardFragment UI Blocking BoardFragment UI Blocking and Memory leack Mar 5, 2022
@jisungbin jisungbin changed the title BoardFragment UI Blocking and Memory leack BoardFragment UI Blocking and Memory leac Mar 5, 2022
@jisungbin jisungbin changed the title BoardFragment UI Blocking and Memory leac BoardFragment UI Blocking and Memory leak Mar 5, 2022
@jisungbin jisungbin pinned this issue Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority High-priority feature
Projects
None yet
Development

No branches or pull requests

1 participant