openfoodfacts / openfoodfacts-androidapp

(Legacy) Native version of Open Food Facts on Android - Coders & Decoders welcome 🤳🥫
https://android.openfoodfacts.org
Apache License 2.0
772 stars 447 forks source link

java.lang.IndexOutOfBoundsException android.text.SpannableStringBuilder.checkRange #1892

Open teolemon opened 6 years ago

teolemon commented 6 years ago
java.lang.IndexOutOfBoundsException: 
  at android.text.SpannableStringBuilder.checkRange (SpannableStringBuilder.java:1270)
  at android.text.SpannableStringBuilder.setSpan (SpannableStringBuilder.java:684)
  at android.text.SpannableStringBuilder.setSpan (SpannableStringBuilder.java:677)
  at android.text.Selection.setSelection (Selection.java:76)
  at android.widget.TextView.semSetSelection (TextView.java:11545)
  at android.widget.Editor$SelectionModifierCursorController.resetDragAcceleratorState (Editor.java:6821)
  at android.widget.Editor$SelectionModifierCursorController.resetTouchOffsets (Editor.java:6810)
  at android.widget.Editor.onFocusChanged (Editor.java:1362)
  at android.widget.TextView.onFocusChanged (TextView.java:9705)
  at android.view.View.clearFocusInternal (View.java:6734)
  at android.view.View.unFocus (View.java:6767)
  at android.view.ViewGroup.requestChildFocus (ViewGroup.java:735)
  at android.view.View.handleFocusGainInternal (View.java:6582)
  at android.view.View.requestFocusNoSearch (View.java:9778)
  at android.view.View.requestFocus (View.java:9757)
  at android.view.View.requestFocus (View.java:9724)
  at android.view.View.requestFocus (View.java:9703)
  at android.view.View.onTouchEvent (View.java:12349)
  at android.widget.TextView.onTouchEvent (TextView.java:10079)
  at android.view.View.dispatchTouchEvent (View.java:10779)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2865)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2550)
  at com.android.internal.policy.DecorView.superDispatchTouchEvent (DecorView.java:582)
  at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent (PhoneWindow.java:1885)
  at android.app.Activity.dispatchTouchEvent (Activity.java:3240)
  at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent (WindowCallbackWrapper.java)
  at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent (WindowCallbackWrapper.java)
  at com.android.internal.policy.DecorView.dispatchTouchEvent (DecorView.java:544)
  at android.view.View.dispatchPointerEvent (View.java:11008)
  at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent (ViewRootImpl.java:5162)
  at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess (ViewRootImpl.java:5014)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4539)
  at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:4592)
  at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:4558)
  at android.view.ViewRootImpl$AsyncInputStage.forward (ViewRootImpl.java:4691)
  at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:4566)
  at android.view.ViewRootImpl$AsyncInputStage.apply (ViewRootImpl.java:4748)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4539)
  at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:4592)
  at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:4558)
  at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:4566)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4539)
  at android.view.ViewRootImpl.deliverInputEvent (ViewRootImpl.java:7099)
  at android.view.ViewRootImpl.doProcessInputEvents (ViewRootImpl.java:7031)
  at android.view.ViewRootImpl.enqueueInputEvent (ViewRootImpl.java:6992)
  at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent (ViewRootImpl.java:7209)
  at android.view.InputEventReceiver.dispatchInputEvent (InputEventReceiver.java:185)
  at android.os.MessageQueue.nativePollOnce (MessageQueue.java)
  at android.os.MessageQueue.next (MessageQueue.java:323)
  at android.os.Looper.loop (Looper.java:136)
  at android.app.ActivityThread.main (ActivityThread.java:6776)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1496)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1386)

image

onkarpandit commented 6 years ago

I would like to work on this bug.

teolemon commented 6 years ago

Please go ahead :-) Feel free to join us on Slack to discuss at https://slack.openfoodfacts.org

onkarpandit commented 6 years ago

Can you please tell me which functionality in the app got this error?

teolemon commented 6 years ago

No idea, this is a bug report from the Play Console

dfg-1310 commented 3 years ago

I am getting this crash on the play store build on Nexus5 having version Android 6.0.1

https://bugzilla.mozilla.org/show_bug.cgi?id=1498239

also looking for any solution or hack for this

teolemon commented 3 years ago

@dfg-1310 do you know in which conditions it happens ?

Ayman-SHaaban-ELsayed commented 2 years ago

ANY one know how to fix this problem?