Android - Fix NPE in ViewRoot#updateBidiOptions

In the developer console on the Android market we are getting a lot of stack traces like this (sent in by users when our app crashes):

java.lang.NullPointerException at
android.view.ViewRoot.updateBidiOptions(ViewRoot.java:290) at
android.view.ViewRoot.performTraversals(ViewRoot.java:737) at
android.view.ViewRoot.handleMessage(ViewRoot.java:1792) at
android.os.Handler.dispatchMessage(Handler.java:99) at
android.os.Looper.loop(Looper.java:143) at
android.app.ActivityThread.main(ActivityThread.java:5068) 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:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at
dalvik.system.NativeStart.main(Native Method)

We have not been able to reproduce the crash and also when we check the Android source code, there is no method called updateBidiOptions. The user comments seems to suggest that the crash happens when they focus on an EditText. Many of the users also mention that this happens on HTC Desire HD but it is not crashing on the Desires we have here.

Popular Posts