question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intermittent IndexOutOfBoundsException on render

See original GitHub issue
  • Markwon version: 4.0.2

I’m not really sure how to reproduce the issue, but am seeing occasional crash reports from Crashlytics like this:

Caused by java.lang.IndexOutOfBoundsException: setSpan (4007 ... 4043) ends beyond length 4007
       at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1327)
       at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:688)
       at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:680)
       at io.noties.markwon.SpannableBuilder.spannableStringBuilder(SpannableBuilder.java:323)
       at io.noties.markwon.MarkwonImpl.render(MarkwonImpl.java:61)
      // ...

I’ve not been able to reproduce the problem, nor does it seem specific to any device/API level/manufacturer. Perhaps some kind of race condition?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
notiescommented, Aug 27, 2019

Hello @damianw !

You are bringing attention to an important issue actually. Why exactly a (mutable) Visitor is reused for a Markwon instance… It’s kind of legacy and I think there must be no performance-wise downsides if visitor won’t be reused (thus making Markwon thread-safe). I’m going to take a look

0reactions
damianwcommented, Aug 29, 2019

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my JTable throw intermittent exceptions?
I am working on a Swing program that uses a JTable to display information to the user. The table currently has over 700...
Read more >
LazyDataModel java.lang.IndexOutOfBoundsException: toIndex
Okay, this error is caused by LazyDataModel sample code, which calls the subList method of the Interface List<E>. The following code is at...
Read more >
Intermittent problems with copy and paste in the REPL with NB ...
I just wanted to let everyone know that we are seeing intermittent errors when pasting things into the REPL that cause the copy/paste...
Read more >
Uses of Class java.lang.IndexOutOfBoundsException
Returns the Printable instance responsible for rendering the page specified by pageIndex . void, Book. setPage(int pageIndex, Printable painter, PageFormat page).
Read more >
Fix list for IBM WebSphere Application Server V8.5
PH33038, Intermittent error parsing an unchanged wsjaas.conf ... IndexOutOfBoundsException thrown from com.ibm.ejs.container.BeanO.reAssociateHandleList.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found