react-native: Android: pointerIndex out of range
Description
All I get is crashlytics log, it appears on some users
Fatal Exception: java.lang.IllegalArgumentException: pointerIndex out of range
at android.view.MotionEvent.nativeGetAxisValue(MotionEvent.java)
at android.view.MotionEvent.getY(MotionEvent.java:2382)
at android.widget.ScrollView.onTouchEvent(ScrollView.java:866)
at com.facebook.react.views.scroll.ReactScrollView.onTouchEvent(ReactScrollView.java:313)
at android.view.View.dispatchTouchEvent(View.java:13463)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3107)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2763)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView.dispatchTouchEvent(RNGestureHandlerEnabledRootView.java:39)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3113)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2777)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:517)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1869)
at android.app.Activity.dispatchTouchEvent(Activity.java:3993)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:475)
at android.view.View.dispatchPointerEvent(View.java:13727)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5670)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5459)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4958)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5011)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4977)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5117)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4985)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5174)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4958)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5011)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4977)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4985)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4958)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7782)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7751)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7702)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7922)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:188)
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:174)
at android.app.ActivityThread.main(ActivityThread.java:7447)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
React Native version:
System:
OS: macOS 11.0
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 120.19 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.6.0 - ~/.nvm/versions/node/v12.6.0/bin/node
Yarn: 1.23.0-20200615.1917 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v12.6.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
Android SDK:
API Levels: 23, 25, 26, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64
Android NDK: 19.2.5345600
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 12.1/12A7403 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_171 - /usr/bin/javac
Python: 2.7.17 - /usr/local/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: mobiletechvn/react-native#v0.63.2.fix-shadow-node => 0.63.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
I cannot guess how to reproduce the error
Expected Results
No crash happen
Snack, code example, screenshot, or link to a repository:
N/A
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 17 (3 by maintainers)
Commits related to this issue
- Prevent a Android crash from dispatchTouchEvent try-catch block around call which intermittently throws an IllegalArgumentException Resolves Issues: - https://github.com/software-mansion/react... — committed to Cambalt/react-native-gesture-handler by escowart 3 years ago
- Fix Android: pointerIndex out of range Fix sentry crash report https://github.com/facebook/react-native/issues/30320 — committed to parti-renaissance/app-mobile by felginep 3 years ago
- Fix Android: pointerIndex out of range Fix sentry crash report https://github.com/facebook/react-native/issues/30320 — committed to parti-renaissance/app-mobile by felginep 3 years ago
I leave here the patch for react-native-gesture-handler: 2.5.0
react-native-gesture-handler+2.5.0.patch
We resolved this issue via writing a patch for react native gesture handler.
“react-native”: “0.62.2”, “react-native-gesture-handler”: “^1.10.2”,
Facing same issue for past few releases