nextcloud-deck
nextcloud-deck copied to clipboard
App crashes with NullPointerException in com.android.server.am.ProcessServiceRecord.updateHasAboveClientLocked
This issue respects the following points:
- [X] I have read the FAQ
- [X] I have searched for existing issues
- [X] The issue affects the Deck Android app, neither the Deck server app nor the Nextcloud Android app.
Describe the bug
- open the app (unfortunately not reproducible)
- see app crash with the stack trace below
I cannot reproduce the bug, e.g. trying in offline mode or changing anything on the nextcloud server. Also, I do not know, if this is a problem with the nextcloud app or the deck app.
Full Crash:
App Version: 1.24.1
App Version Code: 1024001
App Flavor: fdroid
Files App Version Code: 30280290 (PROD)
---
OS Version: 4.14.290 Infinity ∞(1697215784)
OS API Level: 33
Device: davinci
Manufacturer: Xiaomi
Model (and Product): Mi 9T (davinci)
Expected behavior
app does not crash and handle the null pointer exception properly
Deck Android version
1.24.1
Deck server version
1.12.2
Nextcloud Android version
3.29.0
Nextcloud version
28.0.3
Device
Xiaomi - Mi 9T (davinci)
Android Version
13
App Store
- [ ] Google Play Store
- [ ] Google Play Store (Beta channel)
- [X] F-Droid
- [ ] Huawei App Gallery
Stacktrace
java.lang.NullPointerException: Attempt to read from field 'com.android.server.am.ProcessServiceRecord com.android.server.am.ProcessRecord.mServices' on a null object reference in method 'void com.android.server.am.ProcessServiceRecord.updateHasAboveClientLocked()'
at android.os.Parcel.createExceptionOrNull(Parcel.java:3034)
at android.os.Parcel.createException(Parcel.java:3012)
at android.os.Parcel.readException(Parcel.java:2995)
at android.os.Parcel.readException(Parcel.java:2937)
at android.app.IActivityManager$Stub$Proxy.unbindService(IActivityManager.java:5444)
at android.app.ContextImpl.unbindService(ContextImpl.java:2079)
at android.content.ContextWrapper.unbindService(ContextWrapper.java:889)
at com.nextcloud.android.sso.api.AidlNetworkRequest.unbindService(AidlNetworkRequest.java:144)
at com.nextcloud.android.sso.api.AidlNetworkRequest.reconnect(AidlNetworkRequest.java:127)
at com.nextcloud.android.sso.api.AidlNetworkRequest$1.onServiceDisconnected(AidlNetworkRequest.java:91)
at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:2208)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2223)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7937)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:854)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ProcessServiceRecord.updateHasAboveClientLocked(ProcessServiceRecord.java:261)
at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:4869)
at com.android.server.am.ActiveServices.unbindServiceLocked(ActiveServices.java:3175)
at com.android.server.am.ActivityManagerService.unbindService(ActivityManagerService.java:12769)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2558)
@desperateCoder From the stack trace I suspect that the service connection tried to reconnect for some reason. And the unbindService
call seemed to have caused the crash (I suspect an Android Crash). Would be good to have more logs to see which state the SSO Library was in and what caused the reconnect. But I guess due to Proguard, the debug logs are stripped from release builds..
The Crash happened again and the log shows this line before crashing:
07-11 07:56:47.393 I/ActivityManager(1531): Killing 11266:com.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0a403i23 (adj 980): swap low and too many cached
Is this in any way helpful? Can I provide more information somehow?
Sorry, I meant to copy this line
07-11 07:56:47.386 I/ActivityManager(1531): Killing 12054:com.nextcloud.client/u0a404 (adj 990): swap low and too many cached
and
07-11 07:56:47.479 W/ActivityManager(1531): Scheduling restart of crashed service com.nextcloud.client/com.owncloud.android.services.AccountManagerService in 10949ms for connection
The 10s scheduled restart is just before I open the deck app, so it's less than 10s.