Hi, Very rarely, my app crashes in setText. Here is the detail: java.lang.ArrayIndexOutOfBoundsException: index=4 length=4 > at android.text.AndroidBidi.directions(AndroidBidi.java:65) > at android.text.StaticLayout.out(StaticLayout.java:680) > at android.text.StaticLayout.generate(StaticLayout.java:380) > at android.text.DynamicLayout.reflow(DynamicLayout.java:261) > at android.text.DynamicLayout.<init>(DynamicLayout.java:150) > at android.widget.TextView.makeNewLayout(TextView.java:5523) > at android.widget.TextView.checkForRelayout(TextView.java:6022) > at android.widget.TextView.setText(TextView.java:2826) > at android.widget.TextView.setText(TextView.java:2691) > at android.widget.TextView.setText(TextView.java:2666) > at my.handrite.widget.NoteIndexItemView.setNote(NoteIndexItemView.java:100)
In my code, it looks like this: 99 SpannableStringBuilder spannable_string = note.getSpannableString(); 100 mTextView.setText(spannable_string); This happens very rarely, I only get this issue from android market's issue report, never happens when I debug. I want to read the source code of android, but unfortunately, AndroidBidi.java(in android 2.2, android 2.3) don't have row 65(as in the issue report)--it don't have that much rows. So I guess this may happened in Android 3.0+, which we don't have access to the source code yet. Is it possible to find the bug? Thank you! -- Best Regards, Ben Lee -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en