androidapkhidldeadobjectexception

EX_TRANSACTION_FAILED, DEAD_OBJECT error with HIDL


I've looked up all the posts regarding this & also tried to catch DeadObjectException in my Kotlin class, but it hasn't helped. The HIDL implementation is wherein I'm calling the APK (kotlin) from the HAL (c++), which works fine in normal cases. But, when I hit reboot on the console/adb-shell, I see this error:

Abort message: 'Failed HIDL return status not checked. Usually this happens because of a transport error (error parceling, binder driver, or from unparceling). If you see this in code calling
 into "Bn" classes in for a HAL server process, then it is likely that the code there is returning transport errors there (as opposed to errors defined within its protocol). Error is: Status(EX_TRANSACTION_FAILED): DEAD_OBJECT:

I also tried catching for an exception in the HAL when I make the call to the APK. That hasn't helped either. Any suggestions?


Solution

  • After some debugging, found that if I add a signal handler in the HAL, that solves the problem, no longer seeing a crash. Posting it here in case someone else has similar issues