Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PinView.java line 339 #76

Open
brodjag opened this issue Mar 3, 2023 · 1 comment
Open

PinView.java line 339 #76

brodjag opened this issue Mar 3, 2023 · 1 comment

Comments

@brodjag
Copy link

brodjag commented Mar 3, 2023

#Bug report.
Crash:

Fatal Exception: java.lang.IndexOutOfBoundsException: offset(6) should be less than line limit(0)
at android.text.TextLine.measure(TextLine.java:389)
at android.text.Layout.getHorizontal(Layout.java:1254)
at android.text.Layout.getHorizontal(Layout.java:1230)
at android.text.Layout.getPrimaryHorizontal(Layout.java:1200)
at android.text.Layout.getPrimaryHorizontal(Layout.java:1189)
at android.widget.Editor$TextActionModeCallback.onGetContentRect(Editor.java:5434)
at com.android.internal.policy.DecorView$ActionModeCallback2Wrapper.onGetContentRect(DecorView.java:5762)
at com.android.internal.view.FloatingActionMode.invalidateContentRect(FloatingActionMode.java:161)
at android.widget.Editor.refreshTextActionMode(Editor.java:2628)
at android.widget.TextView.spanChange(TextView.java:12091)
at android.widget.TextView$ChangeWatcher.onSpanChanged(TextView.java:15295)
at android.text.SpannableStringBuilder.sendSpanChanged(SpannableStringBuilder.java:1321)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:766)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:690)
at androidx.emoji2.text.SpannableBuilder.setSpan(SpannableBuilder.java:140)
at android.text.Selection.setSelection(Selection.java:96)
at android.text.Selection.setSelection(Selection.java:78)
at android.text.Selection.setSelection(Selection.java:153)
at android.widget.EditText.setSelection(EditText.java:147)
at com.chaos.view.PinView.moveSelectionToEnd(PinView.java:339)
at com.chaos.view.PinView.onSelectionChanged(PinView.java:334)
at android.widget.TextView.spanChange(TextView.java:12098)
at android.widget.TextView$ChangeWatcher.onSpanAdded(TextView.java:15302)
at android.text.SpannableStringBuilder.sendSpanAdded(SpannableStringBuilder.java:1301)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:791)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:690)
at androidx.emoji2.text.SpannableBuilder.setSpan(SpannableBuilder.java:140)
at android.text.Selection.setSelection(Selection.java:96)
at android.text.Selection.setSelection(Selection.java:78)
at android.text.Selection.setSelection(Selection.java:153)
at com.chaos.view.DefaultMovementMethod.initialize(DefaultMovementMethod.java:50)
at android.widget.TextView.setText(TextView.java:6936)
at android.widget.TextView.setText(TextView.java:6751)
at android.widget.EditText.setText(EditText.java:133)
at android.widget.TextView.setText(TextView.java:6703)
at u24_.co.uk.u24_2018.bindingAdapters.PinViewAdapterClipboard.pastClipboard(PinViewAdapterClipboard.java:30)
at u24_.co.uk.u24_2018.databinding.ResetVerificationCodeStepBindingImpl.internalCallbackOnLongClick(ResetVerificationCodeStepBindingImpl.java:182)
at u24
.co.uk.u24_2018.generated.callback.OnLongClickListener.onLongClick(OnLongClickListener.java:11)
at android.view.View.performLongClickInternal(View.java:7961)
at android.view.View.performLongClick(View.java:7919)
at android.widget.TextView.performLongClick(TextView.java:14046)
at android.view.View.performLongClick(View.java:7937)
at android.view.View$CheckForLongPress.run(View.java:30821)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Info:
  • PinView version: 1.4.4
  • Device OS version: android 11
  • Device Name: samsung Galaxy s21 5G and Galaxy A32
Description:
Reproduction Steps:

it rarely occurs. Couldn't replicate on my device.
only in firebase crashlitics

What did I do:

User pasts text from clipboard.
pinView.setText(str);

@Mohyddine
Copy link

Same issue
PinView version: 1.4.4
Device OS version: Android 13
Device Name: Samsung Galaxy A52 5G and Galaxy A52s 5G
it rarely occurs. Couldn't replicate it on my device.
only in firebase Crashlytics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants