Esteem mobile v2.0.9; Using one of the markdown shortcuts, and using backspace after inputting the markdown syntax crashes the app.

in #utopian-io6 years ago (edited)

Project Information

Expected behavior

I expected that after inputting the bullet point markdown tool, I could quickly erase it if I didn't need it anymore or, if I entered it by mistake. I expected the app would still function properly and I could still go ahead to use the post editor.

Actual Behavior

The app crashed after I used the bullet point markdown shortcut, and I deleted the entry immediately.

How to reproduce

  • Enter the post editor.
  • Click on the bullet point markdown shortcut
  • Don't enter any other text after using the shortcut.
  • Press backspace on your keyboard.
  • See error. (The app crashes)

Test Environment

Device: Redmi Note 5 pro
OS: Android 8.1
Software version: Esteem mobile 2.0.9

Screen recording

Logcat

    at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:95)
    at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:132)
    at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:51)
    at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:32)
    at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:138)
    at com.facebook.react.uimanager.UIViewOperationQueue$UpdatePropertiesOperation.execute(UIViewOperationQueue.java:95)
    at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:894)
    at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1001)
    at com.facebook.react.uimanager.UIViewOperationQueue.access$2400(UIViewOperationQueue.java:46)
    at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1061)
    at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
    at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:134)
    at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:105)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1024)
    at android.view.Choreographer.doCallbacks(Choreographer.java:838)
    at android.view.Choreographer.doFrame(Choreographer.java:766)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1012)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:171)
    at android.app.ActivityThread.main(ActivityThread.java:6635)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:83)
    ... 23 more
Caused by: java.lang.IndexOutOfBoundsException: setSpan (3 ... 3) ends beyond length 2
    at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1309)
    at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:680)
    at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:672)
    at android.text.Selection.setSelection(Selection.java:76)
    at android.widget.EditText.setSelection(EditText.java:120)
    at com.facebook.react.views.textinput.ReactEditText.setSelection(ReactEditText.java:250)
    at com.facebook.react.views.textinput.ReactTextInputManager.setSelection(ReactTextInputManager.java:278)
    ... 25 more

GitHub Account

https://github.com/HarryHeights

Link to issue

Sort:  

Hi @harry-heightz, thanks for making this contribution.

I was able to replicate the above behavior following the steps you provided. Although it was difficult at first, a look at the recording clarified things.

The actual and expected behaviors were well explained, it's a good find. I like that you included in your report a crash log. This would help the PO locate the faulty line of code easily.

I see the issue has been acknowledged and also been assigned to a PO for a fix. Good job!

I look forward to more of your contributions.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thanks @fego. But, I'm not quite satisfied with your answer on one of the review questions on the questionnaire.
The steps to reproduce the bug was clearly stated. I don't know what you had issues with. But, if I was unable to get the information across properly, I feel that's why the screen recording is included. Or is the screen just there for advertisement? Because from your review, what I deduce is that, if I'm able to communicate my steps to reproduce the bug in a very detailed manner, I shouldn't include a video. But, I know if a video or screenshot is not included, you'll still call me out for that.
Please I'd love to know what you found difficult in my explanation of steps to reproduce.

Hi, just seeing your response.

Steps are meant to help reproduce a bug. It is almost useless if a bug cannot be reproduced. While a moderator will most definitely go through the video provided, most POs don't have the time to look through a recording.

The recording should complement the written steps. It shouldn't be the only way a project maintainer is able to replicate an issue.

The bug in itself was confusing, confusing in the sense that special measures had to be taken to ensure reproduction. The steps weren't clear enough.

I know the answer in the questionnaire was harsh but that was the only option close enough to the scenario. Maybe in the future we will revisit the questionnaire and probably include more cases.

Maybe they do, but eSteemApp is just a single project. Hence we cannot tailor a questionnaire to suit just the needs of a select set of project maintainers.

Probably use "It was not as clear as it should be" cause I think "Lacked in clarity" connotes a stronger meaning, hence your reaction.

POs on Github ask for screenshots and videos when applicable, especially Esteemapp. Aside from that, I still dunno how you say the steps to reproduce the bug lacked in clarity. What would you have said differently?

Thank you for your review, @fego! Keep up the good work!

Hey, @harry-heightz!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Hi @harry-heightz!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 64432.28
ETH 2648.26
USDT 1.00
SBD 2.78