Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfBoundsException when adding content to headline in last line #101

Open
stefan-niedermann opened this issue Apr 15, 2022 · 0 comments
Labels
bug Something isn't working feature: markdown

Comments

@stefan-niedermann
Copy link
Owner

stefan-niedermann commented Apr 15, 2022

nextcloud-commons:1.6.2

Originally reported at help.nextcloud.com

App Version: 3.4.18
App Version Code: 3004018
App Flavor: play

Files App Version Code: 30190190

---

OS Version: 4.19.111-23350288(G525FXXS5AVB3)
OS API Level: 30
Device: xcover5
Manufacturer: samsung
Model (and Product): SM-G525F (xcover5eea)

---

java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: setSpan (203 ... 205) ends beyond length 203
	at io.noties.markwon.editor.MarkwonEditorTextWatcher$WithPreRender$2$2.run(MarkwonEditorTextWatcher.java:168)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:246)
	at android.app.ActivityThread.main(ActivityThread.java:8653)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: java.lang.IndexOutOfBoundsException: setSpan (203 ... 205) ends beyond length 203
	at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1335)
	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:694)
	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:686)
	at io.noties.markwon.editor.MarkwonEditorImpl$RecordingSpannableStringBuilder.setSpan(MarkwonEditorImpl.java:203)
	at it.niedermann.android.markdown.markwon.handler.HeadingEditHandler.handleMarkdownSpan(HeadingEditHandler.java:69)
	at it.niedermann.android.markdown.markwon.handler.HeadingEditHandler.handleMarkdownSpan(HeadingEditHandler.java:14)
	at io.noties.markwon.editor.MarkwonEditor$SpansHandlerImpl.handle(MarkwonEditor.java:185)
	at io.noties.markwon.editor.MarkwonEditorImpl.process(MarkwonEditorImpl.java:85)
	at io.noties.markwon.editor.MarkwonEditorImpl.preRender(MarkwonEditorImpl.java:157)
	at io.noties.markwon.editor.MarkwonEditorTextWatcher$WithPreRender$2.run(MarkwonEditorTextWatcher.java:137)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:923)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature: markdown
Projects
None yet
Development

No branches or pull requests

1 participant