jax jax - 4 days ago 6
Android Question

java.lang.IndexOutOfBoundsException: getChars (7 ... 0) has end before start

My users are sending unhandled exceptions to me via http://code.google.com/p/android-remote-stacktrace/

I am getting the following but have no idea what it means.

java.lang.IndexOutOfBoundsException: getChars (7 ... 0) has end before start
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:935)
at android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:847)
at android.text.TextUtils.getChars(TextUtils.java:69)
at android.text.SpannableStringBuilder.<init>(SpannableStringBuilder.java:59)
at android.text.SpannableStringBuilder.subSequence(SpannableStringBuilder.java:839)
at android.widget.TextView.extractTextInternal(TextView.java:4541)
at android.widget.TextView.reportExtractedText(TextView.java:4580)
at android.widget.TextView.finishBatchEdit(TextView.java:4723)
at android.widget.TextView.endBatchEdit(TextView.java:4705)
at com.android.internal.widget.EditableInputConnection.endBatchEdit(EditableInputConnection.java:54)
at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:586)
at android.view.inputmethod.BaseInputConnection.commitText(BaseInputConnection.java:174)
at com.android.internal.widget.EditableInputConnection.commitText(EditableInputConnection.java:120)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:231)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:57)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4338)
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:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)

Answer

It's a known bug in the Android framework. Here's a link to the issue.

Comments