logcat crashes with read: unexpected EOF

匿名 (未验证) 提交于 2019-12-03 02:31:01

问题:

running some lengty calculations, and something goes wrong quite late, i tried with breakpoints, with no success so far, so i put into the loop a Log.d to monitor.....

but quite soon logcat crashes with

02-08 16:35:42.820 2936-3402/com.nohkumado.geneticsolving.full D/BaseC: norm:BC sq:49.0 dis:0.0 con:50.0/BC sq:56.0 dis:4.0 con:94.0=1.4069148936170213                                                                      read: unexpected EOF!                                                                      --------- beginning of crash 

and i need to restart studio to get logcat running again...

i looked if i found some setting for buffer size for the logcat, but so far found nothing, so what can be done?

thanks in advance

回答1:

Try setting Logger buffer sizes to off under Settings->Developer options, on your device/emulator. This might be happening because Logger buffer is configured to display limited KB of logs only at a particular time. Next set of logs would only be displayed once previous buffer is cleared.



回答2:

This log you posted is stating the app crashing (although not in the usual way with a stacktrace but it's crashing), not the logcat. Do you have the app selected and filter set to "Show selected application" in the logcat? If so just set the filter to "No Filter" and you'll see all the logs of your app.

Also in case you need to restart the logcat for any reason, rather than restarting Android Studio you could run the following commands which will restart adb and eventually restart your logcat as well:

adb kill-server adb start-server 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!