java.lang.IllegalArgumentException: pointerIndex out of range
- Dominant language
- Java
- Stars
- 488
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
1,错误日志如下:
```text
java.lang.IllegalArgumentException: pointerIndex out of range
at android.view.MotionEvent.null nativeGetAxisValue(null)(MotionEvent.java)
at android.view.MotionEvent.null getX(null)(MotionEvent.java:2201)
at androidx.viewpager.widget.ViewPager.boolean onTouchEvent(android.view.MotionEvent)(ViewPager.java:2241)
at android.view.View.null dispatchTouchEvent(null)(View.java:11757)
at android.view.ViewGroup.null dispatchTransformedTouchEvent(null)(ViewGroup.java:2958)
at android.view.ViewGroup.null dispatchTouchEvent(null)(ViewGroup.java:2636)
at android.view.ViewGroup.null dispatchTransformedTouchEvent(null)(ViewGroup.java:2964)
at android.view.ViewGroup.null dispatchTouchEvent(null)(ViewGroup.java:2650)
at android.view.ViewGroup.null dispatchTransformedTouchEvent(null)(ViewGroup.java:2964)
at android.view.ViewGroup.null dispatchTouchEvent(null)(ViewGroup.java:2650)
at com.omnipotent.free.videodownloader.pro.ui.view.SwipePanel.boolean dispatchTouchEvent(android.view.MotionEvent)(SwipePanel.java:493)
at android.view.ViewGroup.null dispatchTransformedTouchEvent(null)(ViewGroup.java:2964)
at android.view.ViewGroup.null dispatchTouchEvent(null)(ViewGroup.java:2650)
at android.view.ViewGroup.null dispatchTransformedTouchEvent(null)(ViewGroup.java:2964)
at android.view.ViewGroup.null dispatchTouchEvent(null)(ViewGroup.java:2650)
at android.view.ViewGroup.null dispatchTransformedTouchEvent(null)(ViewGroup.java:2964)
at android.view.ViewGroup.null dispatchTouchEvent(null)(ViewGroup.java:2650)
at android.view.ViewGroup.null dispatchTransformedTouchEvent(null)(ViewGroup.java:2964)
at android.view.ViewGroup.null dispatchTouchEvent(null)(ViewGroup.java:2650)
at android.view.ViewGroup.null dispatchTransformedTouchEvent(null)(ViewGroup.java:2964)
at android.view.ViewGroup.null dispatchTouchEvent(null)(ViewGroup.java:2650)
at com.android.internal.policy.DecorView.null superDispatchTouchEvent(null)(DecorView.java:470)
at com.android.internal.policy.PhoneWindow.null superDispatchTouchEvent(null)(PhoneWindow.java:1828)
at android.app.Activity.null dispatchTouchEvent(null)(Activity.java:3302)
at androidx.appcompat.view.WindowCallbackWrapper.boolean dispatchTouchEvent(android.view.MotionEvent)(WindowCallbackWrapper.java:69)
at androidx.appcompat.view.WindowCallbackWrapper.boolean dispatchTouchEvent(android.view.MotionEvent)(WindowCallbackWrapper.java:69)
at com.android.internal.policy.DecorView.null dispatchTouchEvent(null)(DecorView.java:432)
at android.view.View.null dispatchPointerEvent(null)(View.java:11996)
at android.view.ViewRootImpl$ViewPostImeInputStage.null processPointerEvent(null)(ViewRootImpl.java:4806)
at android.view.ViewRootImpl$ViewPostImeInputStage.null onProcess(null)(ViewRootImpl.java:4620)
at android.view.ViewRootImpl$InputStage.null deliver(null)(ViewRootImpl.java:4158)
at android.view.ViewRootImpl$InputStage.null onDeliverToNext(null)(ViewRootImpl.java:4211)
at android.view.ViewRootImpl$InputStage.null forward(null)(ViewRootImpl.java:4177)
at android.view.ViewRootImpl$AsyncInputStage.null forward(null)(ViewRootImpl.java:4304)
at android.view.ViewRootImpl$InputStage.null apply(null)(ViewRootImpl.java:4185)
at android.view.ViewRootImpl$AsyncInputStage.null apply(null)(ViewRootImpl.java:4361)
at android.view.ViewRootImpl$InputStage.null deliver(null)(ViewRootImpl.java:4158)
at android.view.ViewRootImpl$InputStage.null onDeliverToNext(null)(ViewRootImpl.java:4211)
at android.view.ViewRootImpl$InputStage.null forward(null)(ViewRootImpl.java:4177)
at android.view.ViewRootImpl$InputStage.null apply(null)(ViewRootImpl.java:4185)
at android.view.ViewRootImpl$InputStage.null deliver(null)(ViewRootImpl.java:4158)
at android.view.ViewRootImpl.null deliverInputEvent(null)(ViewRootImpl.java:6725)
at android.view.ViewRootImpl.null doProcessInputEvents(null)(ViewRootImpl.java:6664)
at android.view.ViewRootImpl.null enqueueInputEvent(null)(ViewRootImpl.java:6625)
at android.view.ViewRootImpl$WindowInputEventReceiver.null onInputEvent(null)(ViewRootImpl.java:6828)
at android.view.InputEventReceiver.null dispatchInputEvent(null)(InputEventReceiver.java:192)
at android.os.MessageQueue.null nativePollOnce(null)(MessageQueue.java)
at android.os.MessageQueue.null next(null)(MessageQueue.java:325)
at android.os.Looper.null loop(null)(Looper.java:142)
at android.app.ActivityThread.null main(null)(ActivityThread.java:6797)
at java.lang.reflect.Method.null invoke(null)(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.null run(null)(Zygote.java:240)
at com.android.internal.os.ZygoteInit.null main(null)(ZygoteInit.java:772)
```
2,我这边是把代码拷贝进工程里使用的。
3,出现在7.0 和8.0 的手机上。比较少见。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at SwipePanel.java line 493, then trace the MotionEvent path into androidx.viewpager.widget.ViewPager.onTouchEvent, where the stack trace reports the failure. Reproduce the pointer sequence on Android 7.0 or 8.0 and identify the conditions that cause the out-of-range access; done means the exception no longer occurs for that interaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100