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

java.lang.RuntimeException in EndOfParagraphMarkerAdder.onTextChanged #808

Closed
jtreanor opened this issue Apr 15, 2019 · 1 comment · Fixed by #809
Closed

java.lang.RuntimeException in EndOfParagraphMarkerAdder.onTextChanged #808

jtreanor opened this issue Apr 15, 2019 · 1 comment · Fixed by #809
Assignees
Labels

Comments

@jtreanor
Copy link
Contributor

This crash seems to have been around for a while (11.8) but has recently become very common. There have been 227 crashes on 12.1 so far.

Fatal Exception: java.lang.RuntimeException: PARAGRAPH span must end at paragraph boundary (662 follows )
       at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:698)
       at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:672)
       at org.wordpress.aztec.watchers.EndOfParagraphMarkerAdder.onTextChanged(EndOfParagraphMarkerAdder.java:49)
       at android.widget.TextView.sendOnTextChanged(TextView.java:10651)
       at android.widget.TextView.handleTextChanged(TextView.java:10755)
       at android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:14100)
       at android.text.SpannableStringBuilder.sendTextChanged(SpannableStringBuilder.java:1252)
       at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:573)
       at android.text.SpannableStringBuilder.insert(SpannableStringBuilder.java:224)
       at android.text.SpannableStringBuilder.insert(SpannableStringBuilder.java:222)
       at org.wordpress.aztec.AztecText$setupKeyListenersAndInputFilters$dynamicLayoutCrashPreventer$1.filter(AztecText.java:479)
       at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:514)
       at android.text.SpannableStringBuilder.insert(SpannableStringBuilder.java:224)
       at android.text.SpannableStringBuilder.insert(SpannableStringBuilder.java:222)
       at org.wordpress.aztec.watchers.FullWidthImageElementWatcher.insertVisualNewline(FullWidthImageElementWatcher.java:34)
       at org.wordpress.aztec.watchers.FullWidthImageElementWatcher.normalizeEditingAroundImageSpans(FullWidthImageElementWatcher.java:67)
       at org.wordpress.aztec.watchers.FullWidthImageElementWatcher.afterTextChanged(FullWidthImageElementWatcher.java:30)
       at android.widget.TextView.sendAfterTextChanged(TextView.java:10684)
       at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:14113)
       at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1262)
       at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:574)
       at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:504)
       at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:502)
       at org.wordpress.aztec.formatting.LineBlockFormatter.insertMedia(LineBlockFormatter.java:160)
       at org.wordpress.aztec.formatting.LineBlockFormatter.insertImage(LineBlockFormatter.java:135)
       at org.wordpress.aztec.AztecText.insertImage(AztecText.java:1718)
       at org.wordpress.android.editor.AztecEditorFragment.appendMediaFile(AztecEditorFragment.java:1033)
       at org.wordpress.android.ui.posts.EditPostActivity.addMediaVisualEditor(EditPostActivity.java:2890)
       at org.wordpress.android.ui.posts.EditPostActivity.access$5100(EditPostActivity.java:196)
       at org.wordpress.android.ui.posts.EditPostActivity$AddMediaListThread$3.run(EditPostActivity.java:2877)
       at android.os.Handler.handleCallback(Handler.java:789)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6942)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

5c94288ef8b88c296305c342-fabric

@mzorz
Copy link
Contributor

mzorz commented Apr 15, 2019

This seems related to #801, or at least #801 made it more prominent. Looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants