jsibbold / zoomage

A simple pinch-to-zoom ImageView library for Android
http://jsibbold.github.io/zoomage
Apache License 2.0
316 stars 77 forks source link

java.lang.IllegalArgumentException: pointerIndex out of range #114

Open Sandeepbghl80 opened 2 years ago

Sandeepbghl80 commented 2 years ago

Double Tab -> Double Tab Again -> Zoom out several times -> Crash

java.lang.IllegalArgumentException: pointerIndex out of range at android.view.MotionEvent.nativeGetAxisValue(Native Method) at android.view.MotionEvent.getX(MotionEvent.java:2401) at androidx.viewpager.widget.ViewPager.onInterceptTouchEvent(ViewPager.java:2072) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2690) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3188) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2836) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3188) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2836) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3188) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2836) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3188) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2836) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3188) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2836) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3188) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2836) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:508) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1875) at android.app.Activity.dispatchTouchEvent(Activity.java:4241) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:466) at android.view.View.dispatchPointerEvent(View.java:14768) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6353) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6144) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5625) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5682) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5648) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5800) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5656) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5857) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5629) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5682) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5648) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5656) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5629) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8522) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8468) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8419) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8668) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:282) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:8057) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)

Riflin commented 2 years ago

I have the same problem. Any solution?

jsibbold commented 2 years ago

Have you tried using ViewPager2?

Sagar268380 commented 2 years ago

I have the same problem. Any solution?

Riflin commented 2 years ago

Have you tried using ViewPager2?

I hadn't, but I've just tried it and it seems to work well :o. It looks like the problem is only happening when using ViewPager.

Thanks!