nextcloud / nextcloud/android

App Crashes with OutOfMemoy when moving multiple files (30) from within one folder to another

Open
#15,266 1 comment 0 reactions 0 assignees View on GitHub
0. Needs triage bug hotspot: larger folder handling
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

1. Go to folder (contains 1000+ images)
2. Select 30 of them
3. Select move/copy
4. Navigate one layer above, then different subfolder
5. Press MOVE there

### Expected behaviour

Copies the files

### Actual behaviour

Crashes with below log

### Android version

15

### Device brand and model

Samsung SM-S908B

### Stock or custom OS?

Stock

### Nextcloud android app version

30320351

### Nextcloud server version

30.0.6

### Using a reverse proxy?

Yes (server)

### Android logs

### Cause of error
```java
Exception in thread "Thread-57" java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 18896 free bytes and 18KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
at org.apache.harmony.xml.parsers.DocumentBuilderImpl.appendText(DocumentBuilderImpl.java:354)
at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:233)
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: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: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:405)
at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:244)
at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:387)
at java.lang.Thread.run(Thread.java:1119)

```

### App information
* ID: `com.nextcloud.client`
* Version: `30320351`
* Build flavor: `gplay`

### Device information
* Brand: `samsung`
* Device: `b0s`
* Model: `SM-S908B`
* Id: `AP3A.240905.015.A2`
* Product: `b0sxeea`

### Firmware
* SDK: `35`
* Release: `15`
* Incremental: `S908BXXSFFYF1`

### Server error logs

```bash

```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.