Open tanty opened 1 year ago
Hi, that sound strange. Did it worked properly before ? How many files are in the albums and what's their file type (jpg, png, heic, mp4, ...) ? In the app settings, what's the thumbnail size (medium, large, ...) ?
Also, can you give me more information about the device ?
That will help me to understand and maybe reproduce the issue...
Hi, that sound strange. Did it worked properly before ?
In my experience, the application has never worked very well. Before it may load an album but take very long time on getting the thumbnails and be able to scroll. Others, it just crashed.
How many files are in the albums and what's their file type (jpg, png, heic, mp4, ...) ?
It varies a lot. From tens to thousands.
I can reproduce with any album so, let's say, just a bunch of pictures (8?) and all of them JPEGs.
In the app settings, what's the thumbnail size (medium, large, ...) ?
Medium.
Also, can you give me more information about the device ?
That will help me to understand and maybe reproduce the issue...
Sony Xperia zx2c running LineageOS 19-20220902-NIGHTLY-xz2c
Is there any way I can get any debug information or logs from the app?
And just now, the application also crashed just by opening, going to the settings and clicking to the back arrow ...
I think this is related to the image cache. In order to find a solution I might need an access to your Piwigo (just as a guest), so I can try to reproduce it and locate the error.
My gallery is publicly available at: https://gallery.andresgomez.org/
If you need to log in with the minimal privileges, let me know how can I send you the credentials through a private channel.
Ok so I am abled to access your Piwigo but the app doesn't crash when I open the albums.
Maybe try to empty the cache from the app settings, or just reinstall it.
I've emptied the cache: same result.
I've reinstalled the application: same result.
Is there any way of getting logs or backtraces from the app?
BTW, by now I'm using 2.0.4
Which version of Android you are running ?
Sadly I don't know how to get the logs on a Flutter application like Piwigo NG.
Which version of Android you are running ?
Sony Xperia zx2c running LineageOS 19-20220902-NIGHTLY-xz2c
https://wiki.lineageos.org/devices/xz2c/
LineageOS 19 is based on Android 12L
Sadly I don't know how to get the logs on a Flutter application like Piwigo NG.
This may be a priority to be able to use a beta application. If it is beta and for users evaluation it looks critical to me that there should be a way of getting some logging information or, at least, be able to catch a crash stack trace.
So, after a quick session with adb logcat
the problem seems to be that the application is not crashing but rather being killed by Android's lowMemoryKiller (which also kills plenty of other apps at the same time than killing Piwigo NG):
`
05-25 16:20:36.840 0 0 I lowmemorykiller: Killing 'iwigo.piwigo_ng' (32188), adj 0,
05-25 16:20:36.840 0 0 I : to free 1722272kB on behalf of 'UsbFfs-worker' (31715) because
05-25 16:20:36.840 0 0 I : cache 29712kB is below limit 73728kB for oom_score_adj 0
05-25 16:20:36.840 0 0 I : Free memory is -4392kB above reserved.
05-25 16:20:36.840 0 0 I : Free CMA is 668kB
05-25 16:20:36.840 0 0 I : Total reserve is 45728kB
05-25 16:20:36.840 0 0 I : Total free pages is 17972kB
05-25 16:20:36.840 0 0 I : Total file cache is 251876kB
05-25 16:20:36.840 0 0 I : Slab Reclaimable is 62696kB
05-25 16:20:36.840 0 0 I : Slab UnReclaimable is 252012kB
05-25 16:20:36.840 0 0 I : Total Slab is 314708kB
05-25 16:20:36.840 0 0 I : GFP mask is 0x24040c0
05-25 16:20:36.840 0 0 I : Indirect Reclaimable is 0kB
05-25 16:20:36.840 0 0 I : Free Swap 11292kB
05-25 16:20:36.840 0 0 I : queue len is 1 of max 1 reason:0x2 margin:-3548
05-25 16:20:36.840 0 0 I : psi full is 0 psi some is 0
[...]
05-25 16:20:36.925 0 0 I oom_reaper: reaped process 32188 (iwigo.piwigo_ng), now anon-rss:0kB, file-rss:1074336kB, shmem-rss:252kB `
Also, you can see plenty of these warnings:
05-25 16:29:42.730 5874 5904 I flutter : Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
So, other than my phone could have more RAM (4G), often "only" ~700M free, it seems that the Piwigo NG app is not really handling well the amount of used memory. Probably, loading everything even if it is not visible to the user.
The oom killer only happens with this application. I don't usually see this happening.
Hi, this is because the app shows a lot of images and so I added a cache for that. The problem is that it is still taking too much memory on certain devices. I have made some small changes about this but it is hard for me to tell if it will be efficient.
I've made some changes to image display and cache for version 2.2.0.
Please feel free to try it out and see if it solves the issue.
This is not new from this version. Has been happening for quite a while.