参考链接:https://stackoverflow.com/questions/31436157/e-art-failed-sending-reply-to-debugger-broken-pipe-but-application-still-runs
Your dev machine and the Android device communicate like a client server and a broken pipe means that the communication has become invalid. For instance, the client (the Android device) is trying to send a reply to the server (the adb process running on the dev machine) but the server has already closed the socket.
First make sure your app is building correctly by performing a clean/rebuild.
Then if you are running your app using USB debugging on a real phone then you can often fix the problem by unplugging the USB cable and then plugging it back in to reestablish the client/server connection.
If this doesn’t work, you can disconnect the USB cable and (stop the emulator if necessary) and close Android Studio. This is often enough to stop the adb process. Then when you open Android Studio again it will restart and the connection will be reestablished.
If this doesn’t work, you can try stopping the adb server manually using the instructions in this question. For instance, you can try opening command prompt or terminal and going to the sdk/platform-tools directory and typing:
adb kill-server
adb start-server
参考链接:https://stackoverflow.com/questions/17840521/android-fatal-signal-11-sigsegv-at-0x636f7d89-code-1-how-can-it-be-tracked/33678476
debug途中System.out.print着实好用吗,参考链接:https://blog.csdn.net/jessicababy1994/article/details/86544182
android.util.Log常用的方法有以下5个:
注意:不同的打印方法在使用时都是某个方法带上(String tag, String msg)参数,tag表示的是打印信息的标签,msg表示的是需要打印的信息。
Log.v("----------logv",“This is Verbose.”);
Log.d("----------logd",“This is Debug.”);
Log.i("----------logt",“This is Information”);
Log.w("----------logw",“This is Warnning.”);
Log.e("----------loge",“This is Error.”);
一般由a dangling pointer issue, or some sort of buffer overflow有两种SEGV,由一次无效内存访问错误引起。
1,A page was accessed which had the wrong permissions. 如某块内存区域是只读的,而程序尝试去写该块内存。SEGV_ACCERR
2,A page was accessed that is not even mapped into the address space of the application at all.
参考:https://blog.csdn.net/a568478312/article/details/78182422