nextcloud / nextcloud/android

OutOfMemory in `ThreadLocalWorkSource`

Open
#11,060 2 comments 0 reactions 0 assignees View on GitHub
bug feature: sync performance: OOM :brain: stable-3.22
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

Nextcloud App New installed. Hang with this report
## Cause of error
```java
Exception in thread "Binder:5781_9" java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 4482688 free bytes and 4377KB until OOM, target footprint 536870912, growth limit 536870912; failed due to fragmentation (largest possible contiguous allocation 432799744 bytes)
at android.os.ThreadLocalWorkSource.setUid(ThreadLocalWorkSource.java:68)
at android.os.Binder.execTransact(Binder.java:1157)

```

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

### Device information
* Brand: `samsung`
* Device: `a40`
* Model: `SM-A405FN`
* Product: `a40eea`

### Firmware
* SDK: `30`
* Release: `11`
* Incremental: `A405FNXXS4CVH1`

### Expected behaviour

After start syncing the report pop up

### Actual behaviour

App hang

### Android version

11

### Device brand and model

SAMSUNG A40

### Stock or custom OS?

Stock

### Nextcloud android app version

30220320

### Nextcloud server version

25.0.1

### Using a reverse proxy?

Yes. Nginx proxy manager

### Android logs

### Cause of error
```java
Exception in thread "Binder:5781_9" java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 4482688 free bytes and 4377KB until OOM, target footprint 536870912, growth limit 536870912; failed due to fragmentation (largest possible contiguous allocation 432799744 bytes)
at android.os.ThreadLocalWorkSource.setUid(ThreadLocalWorkSource.java:68)
at android.os.Binder.execTransact(Binder.java:1157)

```

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

### Device information
* Brand: `samsung`
* Device: `a40`
* Model: `SM-A405FN`
* Product: `a40eea`

### Firmware
* SDK: `30`
* Release: `11`
* Incremental: `A405FNXXS4CVH1`

### Server error logs

_No response_

### 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.