nextcloud / nextcloud/android

OutOfMemoryError when uploading large amount of files

Ouverte
#10,653 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
bug feature: auto upload hotspot: large upload queue performance: OOM :brain: stable-3.21
Langage dominant
Kotlin
Étoiles
5.6k
Forks
2k
Merge moyen
2 j 18 h
PR mergées (30 j)
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

Log in to android nextcloud mobile app
Automatically upload files
Navigate to others apps on mobile
Launch nextcloud mobile app

### Expected behaviour

Should not crash

### Actual behaviour

### Cause of error
```java
Exception in thread "pool-3-thread-1" java.lang.OutOfMemoryError: Failed to allocate a 56 byte allocation with 3528048 free bytes and 3445KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
at java.util.Arrays.copyOf(Arrays.java:3645)
at java.util.Arrays.copyOf(Arrays.java:3614)
at java.util.ArrayList.grow(ArrayList.java:275)
at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:249)
at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:241)
at java.util.ArrayList.add(ArrayList.java:467)
at org.greenrobot.eventbus.PendingPost.releasePendingPost(PendingPost.java:54)
at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:509)
at org.greenrobot.eventbus.BackgroundPoster.run(BackgroundPoster.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)

```

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

### Device information
* Brand: `samsung`
* Device: `c2q`
* Model: `SM-N986U`
* Id: `SP1A.210812.016`
* Product: `c2qsqw`

### Firmware
* SDK: `31`
* Release: `12`
* Incremental: `N986USQS2FVG6`

### Android version

12

### Device brand and model

Samsung note 20 ultra

### Stock or custom OS?

Stock

### Nextcloud android app version

3.21.0

### Nextcloud server version

24.0.4

### Using a reverse proxy?

No

### Android logs

_No response_

### Server error logs

_No response_

### Additional information

### Cause of error
```java
Exception in thread "pool-3-thread-1" java.lang.OutOfMemoryError: Failed to allocate a 56 byte allocation with 3528048 free bytes and 3445KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
at java.util.Arrays.copyOf(Arrays.java:3645)
at java.util.Arrays.copyOf(Arrays.java:3614)
at java.util.ArrayList.grow(ArrayList.java:275)
at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:249)
at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:241)
at java.util.ArrayList.add(ArrayList.java:467)
at org.greenrobot.eventbus.PendingPost.releasePendingPost(PendingPost.java:54)
at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:509)
at org.greenrobot.eventbus.BackgroundPoster.run(BackgroundPoster.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)

```

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

### Device information
* Brand: `samsung`
* Device: `c2q`
* Model: `SM-N986U`
* Id: `SP1A.210812.016`
* Product: `c2qsqw`

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.