异常:DeadObjectException: Transaction failed on small parcel; remote process probably died

出现异常如下:

System.err: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
10-30 09:51:08.151  3664  3682 W System.err:     at android.os.BinderProxy.transactNative(Native Method)
10-30 09:51:08.151  3664  3682 W System.err:     at android.os.BinderProxy.transact(Binder.java:790)
10-30 09:51:08.151  3664  3682 W System.err:     atcom.zqc.memoryfileread.MainActivity$MyHandler.handleMessage(MainActivity.java:184)
10-30 09:51:08.152  3664  3682 W System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
10-30 09:51:08.152  3664  3682 W System.err:     at android.os.Looper.loop(Looper.java:164)
10-30 09:51:08.152  3664  3682 W System.err:     at android.os.HandlerThread.run(HandlerThread.java:65)

背景:频繁调用 mBinder.transact(BINDER_SET_CAN_WRITE, data, reply, 1); 单向传输数据

异常原因:

1.单向传输是不需要等待服务端返回数据的,但频繁调用占用异步空间,导致空间不足,服务端进程被干掉

 解决方式:改成双向传输即可同步执行,等待服务端返回数据,transact(BINDER_SET_CAN_WRITE, data, reply, 0);

异常:DeadObjectException: Transaction failed on small parcel; remote process probably died_第1张图片

2.没有到过这种情况,直接上图

异常:DeadObjectException: Transaction failed on small parcel; remote process probably died_第2张图片

异常:DeadObjectException: Transaction failed on small parcel; remote process probably died_第3张图片

翻译自:https://stackoverflow.com/questions/45432647/android-throw-deadobjectexception-with-log-transaction-failed-on-small-parcel

你可能感兴趣的:(AS错误集)