android-image-picker icon indicating copy to clipboard operation
android-image-picker copied to clipboard

GC Issue

Open chosw1029 opened this issue 3 years ago • 1 comments

Expected Behavior

Open Image Picker View

Actual Behavior

Not crushed but MainActivity(FragmentActivity) and Fragment was destroyed.

Steps to Reproduce the Problem

  1. open image picker using launcher.launch in fragment
  2. go to download folder and select image ( download folder has many gif images : <= 27 MB )
  3. repeat step 1 and 2
  4. Not crushed but MainActivity and Fragment was destroyed and recreated.
  5. As 4 step. Fragment ViewModel was recreated and selected data saved in ViewModel was cleared.

Log cat

  1. Waiting for a blocking GC Alloc
  2. Background young concurrent copying GC freed 78625(3271KB) AllocSpace objects, 74(30MB) LOS objects, 0% free, 156MB/156MB, paused 2.560ms total 286.331ms
  3. WaitForGcToComplete blocked Alloc on ProfileSaver for 50.512ms
  4. Starting a blocking GC Alloc
  5. MainActivity and Fragment was destroyed and recreated.
  • If using default image folder ( not download folder, this folder has 2 images <= 1 MB ) that worked perfect so I think it is memory issue.

Specifications

  • Image Picker Version: 3.0.0-beta01
  • Android OS: 30 Android 11.0
  • Phone: Galaxy Note 9

chosw1029 avatar Jun 18 '21 13:06 chosw1029

I have fixed @chosw1029 : https://github.com/esafirm/android-image-picker/pull/419

chihung93 avatar Oct 24 '22 04:10 chihung93