bugsnag / bugsnag-react-native

Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
https://docs.bugsnag.com/platforms/react-native
MIT License
370 stars 121 forks source link

Strange Android Crash - DeadSystemException #424

Closed cristianoccazinsp closed 4 years ago

cristianoccazinsp commented 4 years ago

Description

I've just got this exception from bugsnag itself. When looking at the stack trace, it seems like the crash happened from within bugsnag's code.

Would someone tell me if this is indeed from bugsnag, or something else caused it? Here's the full exception log:

java.lang.RuntimeException android.os.DeadSystemException 
    ContextImpl.java:1576 android.app.ContextImpl.registerReceiverInternal
    ContextImpl.java:1528 android.app.ContextImpl.registerReceiver
    ContextImpl.java:1516 android.app.ContextImpl.registerReceiver
    ContextWrapper.java:636 android.content.ContextWrapper.registerReceiver
    Client.java:239 com.bugsnag.android.Client$3.run
    ThreadPoolExecutor.java:1167 java.util.concurrent.ThreadPoolExecutor.runWorker
    ThreadPoolExecutor.java:641 java.util.concurrent.ThreadPoolExecutor$Worker.run
    Thread.java:764 java.lang.Thread.run

Caused by: android.os.DeadSystemException
    ContextImpl.java:1576 android.app.ContextImpl.registerReceiverInternal
    ContextImpl.java:1528 android.app.ContextImpl.registerReceiver
    ContextImpl.java:1516 android.app.ContextImpl.registerReceiver
    ContextWrapper.java:636 android.content.ContextWrapper.registerReceiver
    Client.java:239 com.bugsnag.android.Client$3.run
    ThreadPoolExecutor.java:1167 java.util.concurrent.ThreadPoolExecutor.runWorker
    ThreadPoolExecutor.java:641 java.util.concurrent.ThreadPoolExecutor$Worker.run
    Thread.java:764 java.lang.Thread.run

Issue

Crash

Environment

Library versions:

"bugsnag-react-native": "2.23.2"
"react-native": "0.61.4"
mattdyoung commented 4 years ago

Hi @cristianoccazinsp

Thanks for the report. The DeadSystemException is documented here: https://developer.android.com/reference/android/os/DeadSystemException

The core Android system has died and is going through a runtime restart. All running apps will be promptly killed.

So this crash isn't caused by Bugsnag. The Android system has died and the Bugsnag library likely made a call to a system process that no longer exists. The app is already in the process of being terminated by the OS.