for some reason the append caused this issue. replacing it with setText() solved the issue.
On Jan 24, 6:00 pm, Rimma Sukhovsky <drim...@gmail.com> wrote: > I have a listView which contains TextViews. I append to it several > strings, and some of them are linkified. > > SpannableString str = SpannableString.valueOf(text); > str.setSpan(new URLSpan(url), 0, text.length(), > Spannable.SPAN_INCLUSIVE_EXCLUSIVE); > textView.append(str); > > For some reason, when i compile it for sdk 1.1 it works fine, but on > sdk 1.5 devices (like Galaxy) it crashes with the following error. > > Any ideas why? > > 01-24 15:05:54.915: INFO/dalvikvm(687): Stack overflow, expanding > (0x41048200 to 0x41048000) > 01-24 15:05:54.915: INFO/dalvikvm(687): Shrank stack (to 0x41048200, > curFrame is 0x41049cd8) > 01-24 15:05:54.925: DEBUG/AndroidRuntime(687): Shutting down VM > 01-24 15:05:54.925: WARN/dalvikvm(687): threadid=3: thread exiting > with uncaught exception (group=0x4000fe70) > 01-24 15:05:54.925: ERROR/AndroidRuntime(687): Uncaught handler: > thread main exiting due to uncaught exception > 01-24 15:05:55.014: DEBUG/dalvikvm(687): GC freed 5881 objects / > 487464 bytes in 67ms > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): > java.lang.StackOverflowError > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at > android.text.SpannableStringBuilder.drawText > (SpannableStringBuilder.java:1042) > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at > android.graphics.Canvas.drawText(Canvas.java:1273) > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at > android.text.Styled.each(Styled.java:119) > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at > android.text.Styled.foreach(Styled.java:249) > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at > android.text.Styled.drawText(Styled.java:302) > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at > android.text.Layout.drawText(Layout.java:1346) > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at > android.text.Layout.draw(Layout.java:339) > 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at > android.widget.TextView.onDraw(TextView.java:3921) -- 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