You can't avoid it. Any running app starts seeing DeadSystemException when the Android system is shutting down. Just ignore it.
DeadSystemException