How can I track down the origin of this exception?
It's happening inside the Android framework, and so hard to understand either what's causing it, or how to fix it or workaround it. The exceptions are being logged from customer usage - I cannot reproduce the error, and customer reports are anonymous so I cannot ask them for more details.
java.lang.NullPointerException
at android.widget.PopupWindow$PopupViewContainer.dispatchKeyEvent(PopupWindow.java:1359)
at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2471)
at android.view.ViewRoot.deliverKeyEvent(ViewRoot.java:2431)
at android.view.ViewRoot.handleMessage(View开发者_开发知识库Root.java:1741)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
at dalvik.system.NativeStart.main(Native Method)
You will need to find the source code for whatever version of Android is associated with a given trace, then check out what that line is. I can tell you that the latest code indexed by Google Code Search does not have line 1359 inside dispatchKeyEvent()
.
Looking at the indexed dispatchKeyEvent()
, the only way I can see a NullPointerException
occurring directly in that method would be if the KeyEvent
itself were null
for some reason.
精彩评论