Matisse icon indicating copy to clipboard operation
Matisse copied to clipboard

Images dont load when select folder

Open lucazin opened this issue 5 years ago • 11 comments

Describe the bug

I dont know why... when i change the folder in actionbar, the images dont load. Just the initial images load in start. What can i do?

help me please..its working before, i dont know why happen this.

To Reproduce

  1. Open
  2. change folder in select list
  3. done..nothing show
  4. error album not showing

Expected behavior A clear and concise description of what you expected to happen.

Screenshots xx

Smartphone (please complete the following information):

  • Device: A70
  • OS: Android
  • Version 10

lucazin avatar Sep 20 '20 11:09 lucazin

Just got a bug report where someone killed the app and restated it and went straight into the Matisse image loader and scrolled down a lot and the app crashed from OOM. There is definitively a memory leak in this library.

lawonga avatar Sep 21 '20 13:09 lawonga

Also in this case the loaderManger has a unique id when it should be tied to what you're trying to load. This library is buggy. I'll do a pr when I have time...

lawonga avatar Sep 21 '20 16:09 lawonga

Same issue for me, when I changed folder, no more items are loaded

mathislaurentpiquoti avatar Sep 22 '20 09:09 mathislaurentpiquoti

Same issue for me too

arasu33 avatar Sep 25 '20 08:09 arasu33

I fixed the problem, I replaced in gradle implementation 'androidx.fragment:fragment:1.3.0-alpha08' to implementation 'androidx.fragment:fragment:1.1.0' and it worked fine !! Hope it works for you too

mathislaurentpiquoti avatar Sep 25 '20 08:09 mathislaurentpiquoti

Thanks for me also after replacing implementation 'androidx.fragment:fragment:1.3.0-alpha08' with implementation 'androidx.fragment:fragment:1..3.0-alpha06' and it worked fine !!

arasu33 avatar Sep 25 '20 08:09 arasu33

Its because fragment version lib?

lucazin avatar Oct 13 '20 06:10 lucazin

Not able to switch folder. It showing me white screen. I have use this line in build.gradle(app) implementation 'com.zhihu.android:matisse:0.5.3-beta3' After reading above suggestions, I have implemented following libraries and check result, but it also not working:

  1. implementation 'androidx.fragment:fragment:1.1.0'
  2. implementation 'androidx.fragment:fragment:1.3.0-alpha08'

STPLMAYUR avatar Jul 05 '21 14:07 STPLMAYUR

also having same problem even after adding implementation 'androidx.fragment:fragment:1.1.0'

aZyreTech avatar Aug 04 '21 06:08 aZyreTech

Same problem! No solution?

sadeghbarout avatar Jan 17 '22 11:01 sadeghbarout

Here is what I found:

When changing the folder, a new MediaSelectionFragment is created and replaces the old Fragment. Each MediaSelectionFragment has its own loading process (AlbumMediaCollection) which will be started in Fragment.onActivityCreated and will be stopped in Fragment.onDestroyView. This AlbumMediaCollection uses hard-coded LOADER_ID = 2. As a result, stoping one AlbumMediaCollection, will also stop all other running AlbumMediaCollection.

I tested with 2 different versions of androidx.fragment:fragment. For androidx.fragment:fragment 1.4.1, the problem occurs because the second Fragment.onActivityCreated is called before the first Fragment.onDestroyView. Thus, the first fragment will also stop the 2nd Fragment’s AlbumMediaCollection.

For androidx.fragment:fragment 1.1.0, there is no problem because the second Fragment.onActivityCreated is called after the first Fragment.onDestroyView.

Fix: Assign a unique LOADER_ID for AlbumMediaCollection.

chalermpong avatar Feb 03 '22 08:02 chalermpong