编辑包含文本的Android EditText会在BlackBerry Z10上引发NPE

时间:2014-10-25 13:59:45

标签: android blackberry qnx

我使用Android Runtime 4.3从BlackBerry Z10设备获得了许多相同的例外。每当用户编辑已包含文本的EditText时,应用程序就会崩溃。编辑一个空的EditText工作正常。我没有BlackBerry设备,所以我无法验证崩溃。

有没有人知道这里发生了什么以及如何解决或解决问题?

堆栈跟踪:

java.lang.NullPointerException
    at android.widget.Editor$QnxInsertionHandleView.<init>(Editor.java:3874)
    at android.widget.Editor$InsertionPointCursorController.getQnxHandle(Editor.java:4885)
    at android.widget.Editor.updateCursorsPositions(Editor.java:1577)
    at android.widget.TextView.getUpdatedHighlightPath(TextView.java:4916)
    at android.widget.TextView.onDraw(TextView.java:5103)
    at android.view.View.draw(View.java:13962)
    at android.view.View.getDisplayList(View.java:12856)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3060)
    at android.view.View.getDisplayList(View.java:12793)
    at android.view.View.getDisplayList(View.java:12898)
    at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1411)
    at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1359)
    at android.view.ViewRootImpl.draw(ViewRootImpl.java:2367)
    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2239)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1872)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1004)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5491)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
    at android.view.Choreographer.doCallbacks(Choreographer.java:562)
    at android.view.Choreographer.doFrame(Choreographer.java:532)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
    at android.os.Handler.handleCallback(Handler.java:730)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:5116)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:525)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    at dalvik.system.NativeStart.main(Native Method)

2014年10月31日更新:

评估显示该应用程序在

时不会崩溃
  • EditText为空或
  • EditText包含文本并且设置了“selectAllOnFocus”并且用户开始输入,即覆盖现有文本。

应用程序在

时崩溃
  • EditText包含文本AND未设置“selectAllOnFocus”或
  • EditText包含一个文本并且设置了“selectAllOnFocus”并且用户将光标定位在EditText内(不覆盖之前的文本)。

0 个答案:

没有答案