perf(file-list): db pagination - #17505
Conversation
|
APK file: https://github.com/nextcloud/android/actions/runs/32258040777/artifacts/9367607142 |
daniele-verducci
left a comment
There was a problem hiding this comment.
Hey Alper,
I tried it, but it's still crashing for me. Here's the stacktrace:
2026-08-24 15:25:28.892 12717-12765 ReadFolder...eOperation com.nextcloud.android.qa E Synchronized /: failed
2026-08-24 15:25:28.893 12717-12743 WM-WorkerWrapper com.nextcloud.android.qa E Work [ id=d7d541fe-9e26-4998-9176-87424ecf4e04, tags={ com.nextcloud.client.jobs.metadata.MetadataWorker,*,name:metadata_sync,timestamp:1787577910001,class:MetadataWorker } ] failed because it threw an exception/error
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 2295520 free bytes and 2241KB until OOM, target footprint 603979776, growth limit 603979776; giving up on allocation because <1% of heap free after GC.
at org.apache.harmony.xml.dom.InnerNodeImpl.getChildNodes(InnerNodeImpl.java:56)
at org.apache.jackrabbit.webdav.xml.DomUtil.getContent(DomUtil.java:397)
at org.apache.jackrabbit.webdav.property.DefaultDavProperty.createFromXml(DefaultDavProperty.java:130)
at org.apache.jackrabbit.webdav.MultiStatusResponse.createFromXml(MultiStatusResponse.java:463)
at org.apache.jackrabbit.webdav.MultiStatus.createFromXml(MultiStatus.java:185)
at org.apache.jackrabbit.webdav.client.methods.DavMethodBase.processResponseBody(DavMethodBase.java:282)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1749)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at com.owncloud.android.lib.common.OwnCloudClient.executeMethod(OwnCloudClient.java:192)
at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.run(ReadFolderRemoteOperation.java:62)
at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:193)
at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:466)
at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:281)
at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:132)
at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:141)
at com.nextcloud.client.jobs.metadata.MetadataWorker$refreshFolder$2.invokeSuspend(MetadataWorker.kt:108)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
2026-08-24 15:25:34.018 12717-13036 ReadFolder...eOperation com.nextcloud.android.qa E Synchronized /: failed
2026-08-24 15:25:34.018 12717-13036 AndroidRuntime com.nextcloud.android.qa E FATAL EXCEPTION: Thread-17
Process: com.nextcloud.android.qa, PID: 12717
java.lang.OutOfMemoryError: Failed to allocate a 80032 byte allocation with 968416 free bytes and 945KB until OOM, target footprint 603979776, growth limit 603979776; giving up on allocation because <1% of heap free after GC.
at org.apache.jackrabbit.webdav.MultiStatus.getResponses(MultiStatus.java:128)
at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.readData(ReadFolderRemoteOperation.java:133)
at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.run(ReadFolderRemoteOperation.java:70)
at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:193)
at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:466)
at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:281)
at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:387)
at java.lang.Thread.run(Thread.java:1571)
If it's relevant, here's how I tested it:
- pawned docker container (github.com/tobiasKaminsky/nextcloud-client-testing-server)
- created empty dirs and ampty files with bash for loop and touch (so the files are 0 bytes .txt files)
- runned occ files:scan
- opened in browser to check the APIs are not crashing (OK)
- installed QA APK build from CI and opened: crashes after a while
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
c82fa9c to
9fff08d
Compare
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
APK file: https://github.com/nextcloud/android/actions/runs/33735450064/artifacts/9887294178 |
Issue
When user have a lot of files and/or folder in directory app crashes. Due to fetching all files at once from DB.
{ "header": { "logLevel": "ERROR", "pid": 7829, "tid": 7849, "applicationId": "com.nextcloud.client", "processName": "com.nextcloud.client", "tag": "CursorWindow", "timestamp": { "seconds": 1787142876, "nanos": 504903577 } }, "message": "Failed to read row 615, column 5 from a window with 615 rows, 52 columns" },Changes
FileEntity.How to reproduce crash?