Caught Throwable or Exception is null

后端 未结 5 1103
后悔当初
后悔当初 2021-01-19 01:45

A similar question was asked here for two times and never there was any answer. Or the answer was: \"it is impossible!\" Sorry, it is possible too much:

         


        
5条回答
  •  生来不讨喜
    2021-01-19 02:27

    Have you verified whether e is actually null or not? I.e. by adding something like if (e == null) Log.d("Exception is null"). I would then check if the log statement gets triggered both during normal execution and while debugging. If the results are different between the two, it would indicate a VM bug (unlikely, but possible). If the message doesn't get triggered in either case, then it's likely a debugger issue.

    A few thoughts on further things you can try to debug the issue:

    • Try something like jdb and see if you get the same behaviour

    • You could get a dump of the jdwp communications between the debugger and the device, and see what's going on at that level. Maybe use wireshark or tcpdump and grab the data going over the usb bus to the device.

    • You could try adding some debug statements to dalvik itself. E.g. grab a copy of AOSP and build an emulator image, and then add some debugging statements to dalvik to try and track down what's going on.

    • You could attempt to do some sort of scripted jdwp session with the device

    • You could look at the bytecode (baksmali/dexdump/dedexer), to see if anything looks funny

提交回复
热议问题