nextcloud / nextcloud/android

Random crash in background when server is not reachable [OOM]

Open
#10,682 1 comment 0 reactions 0 assignees View on GitHub
bug connectivity feature: auto upload feature: data usage performance: OOM :brain: stable-3.21
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

I dunno. Was not actively using the app.

### Expected behaviour

Not crash

### Actual behaviour

Crashes in background likely when trying to autoupload images or so

### Android version

12

### Device brand and model

Pixel 4 (flame)

### Stock or custom OS?

Custom (explain in "additional information")

### Nextcloud android app version

3.21.0

### Nextcloud server version

14

### Using a reverse proxy?

No

### Android logs

```java
FATAL EXCEPTION: Thread-39
Process: com.nextcloud.client, PID: 26082
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 1458096 free bytes and 1423KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at sun.security.util.DerValue.(DerValue.java:291)
at sun.security.util.DerInputStream.readVector(DerInputStream.java:469)
at sun.security.util.DerInputStream.readVector(DerInputStream.java:411)
at sun.security.util.DerInputStream.getSet(DerInputStream.java:368)
at sun.security.x509.RDN.(RDN.java:242)
at sun.security.x509.X500Name.parseDER(X500Name.java:803)
at sun.security.x509.X500Name.(X500Name.java:317)
at javax.security.auth.x500.X500Principal.(X500Principal.java:226)
at com.android.org.conscrypt.OpenSSLX509Certificate.getSubjectX500Principal(OpenSSLX509Certificate.java:502)
at okhttp3.internal.tls.BasicTrustRootIndex.(BasicTrustRootIndex.kt:28)
at okhttp3.internal.platform.Platform.buildTrustRootIndex(Platform.kt:163)
at okhttp3.internal.platform.Platform.buildCertificateChainCleaner(Platform.kt:160)
at okhttp3.internal.platform.Android10Platform.buildCertificateChainCleaner(Android10Platform.kt:82)
at okhttp3.internal.tls.CertificateChainCleaner$Companion.get(CertificateChainCleaner.kt:42)
at okhttp3.OkHttpClient$Builder.sslSocketFactory(OkHttpClient.kt:870)
at com.nextcloud.common.PlainClient$Companion.createDefaultClient(PlainClient.kt:62)
at com.nextcloud.common.PlainClient$Companion.access$createDefaultClient(PlainClient.kt:47)
at com.nextcloud.common.PlainClient.(PlainClient.kt:45)
at com.nextcloud.client.network.ClientFactoryImpl.createPlainClient(ClientFactoryImpl.java:94)
at com.nextcloud.client.network.ConnectivityServiceImpl.isInternetWalled(ConnectivityServiceImpl.java:79)
at com.owncloud.android.files.services.FileUploader.retryFailedUploads(FileUploader.java:1093)
at com.owncloud.android.utils.FilesSyncHelper.lambda$restartJobsIfNeeded$0(FilesSyncHelper.java:240)
at com.owncloud.android.utils.FilesSyncHelper$$ExternalSyntheticLambda0.run(Unknown Source:10)
at java.lang.Thread.run(Thread.java:920)
```

### Server error logs

```bash
N/A
```

### Additional information

Android 12, CalyxOS 3.6.0

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.