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

Images dont load when select folder #814

Open
lucazin opened this issue Sep 20, 2020 · 11 comments
Open

Images dont load when select folder #814

lucazin opened this issue Sep 20, 2020 · 11 comments

Comments

@lucazin
Copy link

lucazin commented Sep 20, 2020

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
@lawonga
Copy link

lawonga commented Sep 21, 2020

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
Copy link

lawonga commented Sep 21, 2020

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...

@mathislaurentpiquoti
Copy link

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

@arasu33
Copy link

arasu33 commented Sep 25, 2020

Same issue for me too

@mathislaurentpiquoti
Copy link

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

@arasu33
Copy link

arasu33 commented Sep 25, 2020

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 !!

@lucazin
Copy link
Author

lucazin commented Oct 13, 2020

Its because fragment version lib?

@STPLMAYUR
Copy link

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'

@aZyreTech
Copy link

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

@sadeghbarout
Copy link

Same problem! No solution?

chalermpong pushed a commit to ltman/Matisse that referenced this issue Feb 1, 2022
chalermpong added a commit to ltman/Matisse that referenced this issue Feb 1, 2022
Fix bug images dont load when select folder (zhihu#814)
@chalermpong
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants