nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.2k stars 1.75k forks source link

random crash on resuming failed upload java null #10990

Closed Rhinorulz closed 2 months ago

Rhinorulz commented 1 year ago

⚠️ Before posting ⚠️

Steps to reproduce

  1. Upload some amount of files
  2. Some fail
  3. Restart them

Expected behaviour

The app should not crash

Actual behaviour

The app crashes. I've had 30 crashes today alone.

Android version

11

Device brand and model

Google pixel 6a

Stock or custom OS?

Stock

Nextcloud android app version

3.22.2

Nextcloud server version

24.0.5

Using a reverse proxy?

No

Android logs

Cause of error

Exception in thread "Operations thread" java.lang.NullPointerException: Attempt to read from field 'java.util.concurrent.ConcurrentMap com.owncloud.android.services.OperationsService$OperationsServiceBinder.mBoundListeners' on a null object reference in method 'java.util.concurrent.ConcurrentMap com.owncloud.android.services.OperationsService$OperationsServiceBinder.access$500(com.owncloud.android.services.OperationsService$OperationsServiceBinder)'
    at com.owncloud.android.services.OperationsService$OperationsServiceBinder.access$500(OperationsService.java:261)
    at com.owncloud.android.services.OperationsService.dispatchResultToOperationListeners(OperationsService.java:773)
    at com.owncloud.android.services.OperationsService$ServiceHandler.nextOperation(OperationsService.java:475)
    at com.owncloud.android.services.OperationsService$ServiceHandler.handleMessage(OperationsService.java:405)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.os.HandlerThread.run(HandlerThread.java:67)

App information

Device information

Firmware

Server error logs

No response

Additional information

No response

alcortazzo commented 1 year ago

Same

Cause of error

Exception in thread "Thread-25" java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 5344936 free bytes and 5219KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
    at sun.security.util.DerValue.init(DerValue.java:406)
    at sun.security.util.DerValue.<init>(DerValue.java:337)
    at sun.security.util.DerInputStream.getDerValue(DerInputStream.java:496)
    at sun.security.x509.AVA.<init>(AVA.java:625)
    at sun.security.x509.RDN.<init>(RDN.java:246)
    at sun.security.x509.X500Name.parseDER(X500Name.java:803)
    at sun.security.x509.X500Name.<init>(X500Name.java:317)
    at javax.security.auth.x500.X500Principal.<init>(X500Principal.java:226)
    at com.android.org.conscrypt.OpenSSLX509Certificate.getSubjectX500Principal(OpenSSLX509Certificate.java:502)
    at okhttp3.internal.tls.BasicTrustRootIndex.<init>(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.<init>(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:1072)
    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:1012)

App information

Device information

Firmware

joshtrichards commented 9 months ago

@alcortazzo Your matter is not the same. Please create a dedicated issue for it (after checking for existing ones)

joshtrichards commented 2 months ago

Fixed in #13345