Comments (11)
Sorry, I will fix it at this weekend.
from rxmarkdown.
I will fix it tomorrow~
haha, thank you
from rxmarkdown.
This bug still occurs in 0.0.8-beta. Do you were able to reproduce it?
from rxmarkdown.
@korelstar
So, type Test and then, delete t, s, e. When deleting T, app crashed?
from rxmarkdown.
Using the example app in this repository:
- Change default Text to
Test
in https://github.com/yydcdut/RxMarkdown/blob/master/app/src/main/java/com/yydcdut/markdowndemo/EditActivity.java#L81 - Start example app, chose
Edit and Show
- Put the cursor to the end of the line (after
Test
) - Press ⌫ on your virtual keyboard (removes
t
) - Press ⌫ on your virtual keyboard (removes
s
) - Press ⌫ on your virtual keyboard (the app crashes)
It is important that no other Text is in the EditText
.
from rxmarkdown.
It doesn't crash on my phone
from rxmarkdown.
That's strange. I've tested with different devices and in the emulator. Always the same.
I will try to investigate further ...
from rxmarkdown.
I've installed Android Studio (latest version) on another computer with another OS (Windows instead of Linux) using the default configuration, created an emulator with the default configuration and checked out the master
branch of this repository. Then I did the steps shown above (#19 (comment)) and found that the app crashes! Here is the updated Exception (line numbers differ to my first posting, since master
has changed).
java.lang.IndexOutOfBoundsException: getChars (1 ... 2) ends beyond length 1
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1265)
at android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:1147)
at android.text.TextUtils.getChars(TextUtils.java:89)
at android.text.SpannableStringBuilder.<init>(SpannableStringBuilder.java:66)
at android.text.SpannableStringBuilder.subSequence(SpannableStringBuilder.java:1139)
at com.yydcdut.rxmarkdown.edit.BlockQuotesController.onTextChanged(BlockQuotesController.java:74)
at com.yydcdut.rxmarkdown.RxMDEditText.onTextChanged4Controller(RxMDEditText.java:291)
at com.yydcdut.rxmarkdown.RxMDEditText.access$900(RxMDEditText.java:54)
at com.yydcdut.rxmarkdown.RxMDEditText$EditTextWatcher.onTextChanged(RxMDEditText.java:212)
at android.widget.TextView.sendOnTextChanged(TextView.java:8186)
at android.widget.TextView.handleTextChanged(TextView.java:8248)
at android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:10370)
at android.text.SpannableStringBuilder.sendTextChanged(SpannableStringBuilder.java:1208)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:578)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:509)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:508)
at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:844)
at android.view.inputmethod.BaseInputConnection.setComposingText(BaseInputConnection.java:617)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:400)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:91)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
So what's different between us? Is it possible that you try with a fresh installation, too?
from rxmarkdown.
It's no reason crashed on method com.yydcdut.rxmarkdown.edit.BlockQuotesController.onTextChanged(CharSequence s, int start, int before, int after)
when deleting.
The parameter 'after' is always 0 when deleting, and
if (after == 0) {
return;
}
from rxmarkdown.
OK, I reproduced it.
Delete 3 or 4 chars and add less 3 or 4 char in the same time.
from rxmarkdown.
Exactly! Phew, I'm very happy that you were able to reproduce it. 😄
Any ideas how to solve this? I had problems to understand the respective code ...
from rxmarkdown.
Related Issues (20)
- Gives error in List HOT 1
- ArrayIndexOutOfBoundsException HOT 1
- Backslash HOT 1
- CodeBlock misplaces cursor HOT 2
- List should be interconvertible HOT 1
- Markdown gets not rendered in RxMDTextView when setting another text HOT 3
- Alternate Headers no longer displayed HOT 2
- unordered lists/bullet lists have duplicate indicators for new items
- how to user in rxandroid2 and rxjava2 HOT 2
- Drawing a line with --- does not work immediately HOT 3
- IndexOutOfBounce Exception when select and cut
- setOnLinkClickCallback does not appear to be working HOT 1
- Apostrophes in links don't get parsed correctly
- Add support for Latex math
- Link detection faulty
- Checkboxes are bigger in TextView when line contains '☑'-character
- add try catch when parsing image tag
- how can i add my own rules?
- How to change code font colour for TextFactory?
- how can i support maths formula in your editor ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxmarkdown.