rethink-app icon indicating copy to clipboard operation
rethink-app copied to clipboard

v055u: DeadSystemException in ApplicationPackageManager.getInstalledPackagesAsUser (ApplicationPackageManager.java:789)

Open ignoramous opened this issue 2 months ago • 0 comments

Fatal Exception: java.lang.RuntimeException: android.os.DeadSystemException
       at android.app.ApplicationPackageManager.getInstalledPackagesAsUser(ApplicationPackageManager.java:789)
       at android.app.ApplicationPackageManager.getInstalledPackages(ApplicationPackageManager.java:774)
       at com.celzero.bravedns.database.RefreshDatabase.process(RefreshDatabase.kt:170)
       at com.celzero.bravedns.database.RefreshDatabase$1.invokeSuspend(RefreshDatabase.kt:104)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
       at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)

From Google Gemini:

The android.os.DeadSystemException typically indicates that a binder transaction failed because the remote process (often the Android system server or another app's service) has died or is in an unstable state. In the context of an application performing database operations, this often points to an issue where the app is interacting with a system service (e.g., ContentResolver, PackageManager, ConnectivityManager) or another process that has crashed, or the system itself is under severe memory pressure, leading to the system killing processes to recover. In com.celzero.bravedns.database.RefreshDatabase.process , the DeadSystemException suggests that during the process method, an interaction with a system-level service or another application's component (which might be exposed through a system API) is failing because the target process is no longer alive or responsive. This could happen if:

  1. System Service Crash: A critical system service (like ActivityManagerService , PackageManagerService , etc.) that RefreshDatabase.process might be implicitly or explicitly interacting with has crashed.
  2. Memory Pressure: The device is under extreme memory pressure, and the system has killed a process that RefreshDatabase.process was trying to communicate with via Binder. This can also lead to the system server itself becoming unstable.
  3. Binder Transaction Buffer Limit: Although less common for this specific exception, exceeding the Binder transaction buffer limit can sometimes manifest in similar ways, especially if large data payloads are being passed between processes.
  4. ANR in another Process: An Application Not Responding (ANR) event in a system service or another crucial app could prevent it from responding to binder calls, eventually leading to a DeadSystemException for the caller.
  5. Malfunctioning System Component: A specific system component or API that the RefreshDatabase method relies on might be in a bad state or have a bug, especially on certain device models or Android versions.

...

ignoramous avatar Nov 06 '25 18:11 ignoramous