nextcloud / nextcloud/android

OutOfMemoryError when uploading large amount of files

Đang mở
#10,653 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug feature: auto upload hotspot: large upload queue performance: OOM :brain: stable-3.21
Ngôn ngữ chính
Kotlin
Star
5.6k
Fork
2k
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
92

Mô tả

### ⚠️ 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`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.