Android Question java.lang.IllegalArgumentException: pointerIndex out of range

Ju Yang

Active Member
Licensed User
Longtime User
Use photoview and TabStrip, as the image of the operation will be reported to reduce this error,
B4X:
java.lang.IllegalArgumentException: pointerIndex out of range
    at android.view.MotionEvent.nativeGetAxisValue(Native Method)
    at android.view.MotionEvent.getX(MotionEvent.java:2014)
    at android.support.v4.view.MotionEventCompatEclair.getX(MotionEventCompatEclair.java:32)
    at android.support.v4.view.MotionEventCompat$EclairMotionEventVersionImpl.getX(MotionEventCompat.java:110)
    at android.support.v4.view.MotionEventCompat.getX(MotionEventCompat.java:462)
    at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:1916)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1961)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2372)
    at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1719)
    at android.app.Activity.dispatchTouchEvent(Activity.java:2791)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2333)
    at android.view.View.dispatchPointerEvent(View.java:8671)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4164)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4030)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3580)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3633)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3599)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3716)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3607)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3773)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3580)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3633)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3599)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3607)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3580)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5848)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5822)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5793)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5938)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:143)
    at android.os.Looper.loop(Looper.java:122)
    at android.app.ActivityThread.main(ActivityThread.java:5283)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
 

Attachments

  • test.zip
    56 KB · Views: 220

DonManfred

Expert
Licensed User
Longtime User
Note i use b4a 6

After adding
B4X:
#AdditionalJar: com.android.support:support-v4
the project runs fine here

I dont get the error you told!?
 
Upvote 0

Ju Yang

Active Member
Licensed User
Longtime User
I use b4a 5.8 ,and Frequent Zoom image then get the error. I will test with b4a 6.0.
 
Upvote 0

icefairy333

Active Member
Licensed User
Longtime User
Use photoview and TabStrip, as the image of the operation will be reported to reduce this error,
B4X:
java.lang.IllegalArgumentException: pointerIndex out of range
    at android.view.MotionEvent.nativeGetAxisValue(Native Method)
    at android.view.MotionEvent.getX(MotionEvent.java:2014)
    at android.support.v4.view.MotionEventCompatEclair.getX(MotionEventCompatEclair.java:32)
    at android.support.v4.view.MotionEventCompat$EclairMotionEventVersionImpl.getX(MotionEventCompat.java:110)
    at android.support.v4.view.MotionEventCompat.getX(MotionEventCompat.java:462)
    at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:1916)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1961)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2372)
    at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1719)
    at android.app.Activity.dispatchTouchEvent(Activity.java:2791)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2333)
    at android.view.View.dispatchPointerEvent(View.java:8671)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4164)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4030)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3580)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3633)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3599)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3716)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3607)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3773)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3580)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3633)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3599)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3607)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3580)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5848)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5822)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5793)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5938)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:143)
    at android.os.Looper.loop(Looper.java:122)
    at android.app.ActivityThread.main(ActivityThread.java:5283)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
please show you build config,which sdk version you are using?
I'm using b4a6+sdk(api level24)
 
Upvote 0
Top