应用的一个场景在不断的跑自动化脚本出现无响应

日志如下:

[2018-11-06 10:12:52:665]  [main][MyUncaughtExceptionHandler] [ERROR] !!! this unCaughtException lead to hid restart,which occured in thread of main
java.lang.RuntimeException: Could not read input channel file descriptors from parcel.
    at android.view.InputChannel.nativeReadFromParcel(Native Method)
    at android.view.InputChannel.readFromParcel(InputChannel.java:148)
    at android.view.IWindowSession$Stub$Proxy.addToDisplay(IWindowSession.java:841)
    at android.view.ViewRootImpl.setView(ViewRootImpl.java:745)
    at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:378)
    at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:114)
    at android.widget.Toast$TN.handleShow(Toast.java:470)
    at android.widget.Toast$TN$1.run(Toast.java:355)
    at android.os.Handler.handleCallback(Handler.java:761)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:156)
    at android.app.ActivityThread.main(ActivityThread.java:6618)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

查看是因为用到了HandlerThread,在界面退出的时候没有调用handler.quit()。每次进界面都会新建HandlerThread。

你可能感兴趣的:(android,handlerThread)