Crash on empty checklist entry
CDSoft opened this issue Β· comments
Christophe Delord commented
Please use GitHub reactions π to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Describe the bug
The application crashes when a new empty checklist entry is validated.
To Reproduce
Steps to reproduce the behavior:
- Create a new note
- Start a new checklist. E. G.
- [x] done
- Add a new empty entry:
- [ ]
and press entrer - See java crash report
Expected behavior
Empty entry added or removed, no crash
Screenshots
Smartphone (please complete the following information):
- Nextcloud Notes-Version (android app): 3.4.16
- F-Droid or Play Store: fdroid
- Android-Version: 4.14.190-perf+(2108182246)
- Device: HD1903 (OnePlus7T_EEA)
Server
- Nextcloud version: 22.2.0
- Nextcloud Notes version (server app): 4.1.1
Stacktrace
java.lang.IndexOutOfBoundsException: replace (11 ... 18) ends beyond length 17
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1325)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:513)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:507)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:37)
at it.niedermann.android.markdown.markwon.textwatcher.AutoContinuationTextWatcher.deleteCustomText(AutoContinuationTextWatcher.java:78)
at it.niedermann.android.markdown.markwon.textwatcher.AutoContinuationTextWatcher.afterTextChanged(AutoContinuationTextWatcher.java:60)
at it.niedermann.android.markdown.markwon.textwatcher.LowerIndentionTextWatcher.afterTextChanged(LowerIndentionTextWatcher.java:49)
at it.niedermann.android.markdown.markwon.textwatcher.SearchHighlightTextWatcher.afterTextChanged(SearchHighlightTextWatcher.java:61)
at it.niedermann.android.markdown.markwon.textwatcher.CombinedTextWatcher.afterTextChanged(CombinedTextWatcher.java:47)
at android.widget.TextView.sendAfterTextChanged(TextView.java:10626)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:13629)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1277)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:577)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:507)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:37)
at android.text.method.QwertyKeyListener.onKeyDown(QwertyKeyListener.java:228)
at android.text.method.TextKeyListener.onKeyDown(TextKeyListener.java:141)
at android.widget.TextView.doKeyDown(TextView.java:8490)
at android.widget.TextView.onKeyDown(TextView.java:8264)
at android.view.KeyEvent.dispatch(KeyEvent.java:2842)
at android.view.View.dispatchKeyEvent(View.java:14326)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at android.widget.ScrollView.dispatchKeyEvent(ScrollView.java:491)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1974)
at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:505)
at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1884)
at android.app.Activity.dispatchKeyEvent(Activity.java:4091)
at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.java:122)
at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:84)
at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:140)
at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:599)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3068)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:412)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:6397)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6265)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5735)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5792)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5758)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5910)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5766)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5967)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5739)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5792)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5758)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5766)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5739)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8639)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8590)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8488)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:5465)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8010)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Niedermann IT-Dienstleistungen commented
Thank you for the report! This issue will be fixed in nextcloud-commons:1.5.1
which will be used in Notes 3.4.17
.