PictureSelector 双指反复缩放图片,大概率会崩溃:java.lang.IllegalArgumentException: pointerIndex out of range

pqwbnv8z  于 5个月前  发布在  Java
关注(0)|答案(2)|浏览(181)

Current use version?

当前使用的版本是多少?
io.github.lucksiege:pictureselector:v3.11.1

Will this problem occur in demo?

Demo能否复现这问题?
demo暂时没有使用,是直接集成使用后会容易复现

Describe the problem or provide an error log?

描述问题或提供错误log?
复现方式:双指反复缩放图片,大概率会崩溃,
以下是崩溃日志:

1 | java.lang.IllegalArgumentException: pointerIndex out of range
-- | --
2 | at android.view.MotionEvent.nativeGetAxisValue(Native Method)
3 | at android.view.MotionEvent.getX(MotionEvent.java:2432)
4 | at androidx.viewpager.widget.ViewPager.onInterceptTouchEvent(Unknown Source:56)
5 | at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2661)
6 | at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
7 | at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2812)
8 | at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
9 | at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2812)
10 | at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
11 | at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2812)
12 | at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
13 | at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2812)
14 | at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
15 | at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2812)
16 | at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3131)
17 | at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2812)
18 | at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:561)
19 | at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1895)
20 | at android.app.Activity.dispatchTouchEvent(Activity.java:4319)
21 | at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(Unknown Source:2)
22 | at crosspage.WindowCallbackWrapper.dispatchTouchEvent(Unknown Source:6)
23 | at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:519)
24 | at android.view.View.dispatchPointerEvent(View.java:15130)
25 | at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6671)
26 | at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6459)
27 | at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5900)
28 | at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5957)
29 | at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5923)
30 | at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6088)
31 | at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5931)
32 | at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6145)
33 | at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5904)
34 | at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5957)
35 | at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5923)
36 | at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5931)
37 | at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5904)
38 | at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8926)
39 | at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8877)
40 | at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8845)
41 | at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9059)
42 | at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:280)
43 | at android.os.MessageQueue.nativePollOnce(Native Method)
44 | at android.os.MessageQueue.next(MessageQueue.java:337)
45 | at android.os.Looper.loopOnce(Looper.java:168)
46 | at android.os.Looper.loop(Looper.java:299)
47 | at android.app.ActivityThread.main(ActivityThread.java:8103)
48 | at java.lang.reflect.Method.invoke(Native Method)
49 | at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
50 | at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
ufj5ltwl

ufj5ltwl1#

从报错信息看是androidx.viewpager.widget.ViewPage异常,但v3.11.1版本应该是使用的androidx.viewpager2.widget.ViewPage2,有对代码进行改动吗

plupiseo

plupiseo2#

多点触控问题,即使使用了ViewPager2也会偶现这个问题

相关问题