nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.32k stars 1.78k forks source link

OOM in `ReadFolderRemoteOperation`/ `fetchAndSyncRemoteFolder` #9903

Open danikuci1 opened 2 years ago

danikuci1 commented 2 years ago

Steps to reproduce

  1. Select files in one folder
  2. Cut and paste them into a second folder
  3. Profit?

Expected behaviour

Expected nextcloud to move the files.

Actual behaviour

**** CAUSE OF ERROR ****

java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 2074992 free bytes and 2026KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
    at org.apache.harmony.xml.dom.ElementImpl.<init>(ElementImpl.java:51)
    at org.apache.harmony.xml.dom.DocumentImpl.createElementNS(DocumentImpl.java:347)
    at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:272)
    at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:296)
    at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:296)
    at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:296)
    at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:296)
    at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:128)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
    at org.apache.jackrabbit.webdav.xml.DomUtil.parseDocument(DomUtil.java:104)
    at org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getResponseBodyAsDocument(DavMethodBase.java:113)
    at org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getRootElement(DavMethodBase.java:137)
    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:205)
    at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.run(ReadFolderRemoteOperation.java:80)
    at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:187)
    at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:405)
    at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:239)
    at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:363)
    at java.lang.Thread.run(Thread.java:920)

**** APP INFORMATION **** ID: com.nextcloud.client Version: 30190090 Build flavor: generic

**** DEVICE INFORMATION **** Brand: google Device: sunfish Model: Pixel 4a Id: SQ1A.220205.002 Product: sunfish

**** FIRMWARE **** SDK: 31 Release: 12 Incremental: 8010174

Can you reproduce this problem on https://try.nextcloud.com?

Environment data

Android version:

Device model:

Stock or customized system:

Nextcloud app version:

Nextcloud server version:

Reverse proxy:

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

AlvaroBrey commented 2 years ago

@danikuci1 How many files were you trying to move?

Also please fill in the rest of the report template, especially the Environment data

danikuci1 commented 2 years ago

It was maybe 20 or 30 files in a folder of maybe 15K files total.

Apologies as I had thought the rest of the environment info would be copied with the crash report. Will retrieve and add.