Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes with NullPointerException in com.android.server.am.ProcessServiceRecord.updateHasAboveClientLocked #1621

Open
4 of 7 tasks
cheriimoya opened this issue May 2, 2024 · 3 comments

Comments

@cheriimoya
Copy link

This issue respects the following points:

Describe the bug

  1. open the app (unfortunately not reproducible)
  2. 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)
  • 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)
@David-Development
Copy link
Collaborator

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

@cheriimoya
Copy link
Author

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?

@cheriimoya
Copy link
Author

cheriimoya commented Jul 11, 2024

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.

Screenshot_20240711-082002_MatLog.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants