问题
my app is nearly done. I'm only doing the bugfixing now. I'm running into a problem that I sometimes randomly (so not always the same time or after the same actions are done) get my app crashed. LogCat just tells me
threadid=11 thread eixiting with uncaught exception (group=0x4134d2a0)
But there is no "caused by" what normally would come so I can actually catch the exception. When it crashes (randomly) this gets written into my console
[2013-10-22 15:39:36 - ddms] null
java.lang.NullPointerException
at com.android.ddmlib.Client.read(Client.java:698)
at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:311)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)
[2013-10-22 15:39:36 - ddms] null
java.lang.NullPointerException
at com.android.ddmlib.Client.read(Client.java:698)
at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:311)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)
But these aren't classes of mine. How can I catch the exception? Please be aware that I'm not able to post the whole code here. It's firstly too much and I'm not allowed to... The app crashes randomly. I don't know why and how to handle it. Any suggestions?
I'm running the app on a galaxy note right now.
回答1:
These errors occur when something is wrong with the communication between DDMS and the device. They're generally harmless, but you can solve them by restarting the ADB server:
adb kill-server
adb start-server
If you're using the emulator and this doesn't solve the problem, try deleting and recreating the AVD.
回答2:
Is there no "Caused by..." text in your logcat? It should point to the code that has caused the error.
来源:https://stackoverflow.com/questions/19519660/thread-exiting-with-uncaught-exception