You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
With LineageOS 18.1 (Android 11) on a OnePlus 7 Pro, when there is a great amount of pictures in the DCIM directory (5k+ in my case), the application crashes on startup. This is caused by the application scanning ALL image files in that directory on startup to create the thumbnails for the gallery while building the Camera fragment.
The cameraFragmentViewModel.updateGalleryThumb(); call in the onResume() method in src/main/java/com/particlesdevs/photoncamera/ui/camera/CameraFragment.java takes several minutes in this case, and the application crashes after finishing.
To Reproduce
Steps to reproduce the behavior:
Have a sizable amount of pictures on a LineageOS 18.1 / Android 11 phone
Launch Photon Camera
Wait
Wait...
Crash
Expected behavior
The application starts up. Maybe first boot takes longer. Maybe gallery startup takes longer.
Bypassing the scanning on startup lets the application start, but it crashes getting into the gallery. Putting this in a background thread could help. Maybe a cache could help with the UX side of things, in this case. An option to use an external gallery app could be used as a workaround.
The text was updated successfully, but these errors were encountered:
Work needs to be done around gallery image loading and thumbnailing, as it reads the whole directory every time, but the application itself can start even with a high amount of images in the DCIM directory on Android 11, and simply becomes unbearably slow when working with the gallery.
Still happening to me. I had 2000+ images in DCIM folder, and it uses ~10 seconds to start or switch views. Guess it's less than 5000+ and it's just slow rather than crash?
The phone is Oneplus 8. OS is LineageOS 18.1. PhotonCamera is v0.8.12381.
Describe the bug
With LineageOS 18.1 (Android 11) on a OnePlus 7 Pro, when there is a great amount of pictures in the DCIM directory (5k+ in my case), the application crashes on startup. This is caused by the application scanning ALL image files in that directory on startup to create the thumbnails for the gallery while building the Camera fragment.
The
cameraFragmentViewModel.updateGalleryThumb();
call in theonResume()
method insrc/main/java/com/particlesdevs/photoncamera/ui/camera/CameraFragment.java
takes several minutes in this case, and the application crashes after finishing.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The application starts up. Maybe first boot takes longer. Maybe gallery startup takes longer.
Logs
https://gist.github.com/frikisama/ff78255ff0a6ca731f705ed2c04df9e4
Smartphone (please complete the following information):
Additional context
The background could be the slow FS access on Android 11. See here for example: syncthing/syncthing-android#1630
Or here: https://www.reddit.com/r/androiddev/comments/kpn68k/android_11_very_slow_file_access_performance/
Bypassing the scanning on startup lets the application start, but it crashes getting into the gallery. Putting this in a background thread could help. Maybe a cache could help with the UX side of things, in this case. An option to use an external gallery app could be used as a workaround.
The text was updated successfully, but these errors were encountered: