StringIndexOutOfBoundsException when cutting/copying chip
ericksli opened this issue · 3 comments
ericksli commented
When I try to double tap the chip and the context menu is shown. After clicking copy/cut in the menu, the app crash due to StringIndexOutOfBoundsException
.
08-03 23:21:04.274 17538-17538/com.hootsuite.nachos.sample E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.hootsuite.nachos.sample, PID: 17538
java.lang.StringIndexOutOfBoundsException: length=1; regionStart=7; regionLength=-6
Error cutting text index [16, 17] for text [ �testing� �十� �廿三條� setText] and substring [ ]
at com.hootsuite.nachos.NachoTextView.onTextContextMenuItem(NachoTextView.java:593)
at android.widget.Editor$TextActionModeCallback.onActionItemClicked(Editor.java:3483)
at com.android.internal.policy.PhoneWindow$DecorView$ActionModeCallback2Wrapper.onActionItemClicked(PhoneWindow.java:3605)
at android.widget.Editor$LeTextActionModelImpl$3.onMenuItemClick(Editor.java:6662)
at com.letv.leui.text.LeFloatingToolbar$FloatingToolbarMainPanel$1.onClick(LeFloatingToolbar.java:658)
at android.view.View.performClick(View.java:5226)
at android.view.View$PerformClick.run(View.java:21350)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5582)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
simon-tse-hs commented
Does this happen when you're typing only unicode characters like chinese? What about just standard English?
simon-tse-hs commented
Yup, just replicated with just regular string. Thank you very much for reproducing this particular bug. We were trying ti find it :)
thelittlefireman commented
Any news for this ? i get into this on my app sometimes
thanks