Describe the bug
Viewing "edited" message immediately after saving it causes crashes.
This happens time to time not regularly.
To Reproduce
Steps to reproduce the behavior:
Send a message (on any group)
Edit & modify it
Click Save
Now quickly click on "edited" to view edit histories.
App crashes.
But after a while I checked same message history it worked as expected.
Expected behavior
It should show the edit history without any crash.
Smartphone (please complete the following information):
Device: Lenovo Tab4 8 Plus (TB-8704X)
OS: Android 9
Additional context
App version: 1.6.10.sc75 [40101252] (F-d7e7a319)
Store: F-Droid
Homeserver: matrix.org
Related labs settings: [Have you enabled any settings in labs (which ones), and does the issue still exist when disabling these?] - Mark chats as unread, Enable swipe to reply in timeline, Enable threaded messages, Enable defferred DMs, Enable rich text editor.
Logs have been submitted using the app's built-in bug report (/"rageshake") mechanism: No
Upstream relevance
Does this issue exist in Element Android? - Not sure
If this issue exists in Element Android, please also link the corresponding bug report (create a new one if it doesn't exist yet) - Not sure
Logs:
FATAL EXCEPTION: main
Process: de.spiritcroc.riotx, PID: 4789
java.lang.IndexOutOfBoundsException: getChars (-1 ... -1) starts before 0
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1326)
at android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:1202)
at android.text.TextUtils.getChars(TextUtils.java:109)
at android.text.SpannableStringBuilder.<init>(SpannableStringBuilder.java:67)
at android.text.SpannableStringBuilder.subSequence(SpannableStringBuilder.java:1194)
at me.saket.bettermovementmethod.BetterLinkMovementMethod$ClickableSpanWithText.ofSpan(BetterLinkMovementMethod.java:27)
at me.saket.bettermovementmethod.BetterLinkMovementMethod.dispatchUrlLongClick(BetterLinkMovementMethod.java:1)
at im.vector.app.core.utils.EvenBetterLinkMovementMethod.dispatchUrlLongClick(EvenBetterLinkMovementMethod.kt:1)
at me.saket.bettermovementmethod.BetterLinkMovementMethod$1.onTimerReached(BetterLinkMovementMethod.java:26)
at me.saket.bettermovementmethod.BetterLinkMovementMethod$LongPressTimer.run(BetterLinkMovementMethod.java:3)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Describe the bug Viewing "edited" message immediately after saving it causes crashes. This happens time to time not regularly.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should show the edit history without any crash.
Smartphone (please complete the following information):
Additional context
Upstream relevance
Logs: