Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crashes when scale goes below minimumZoomScale on Android #1

Closed
jabirbarber opened this issue May 31, 2018 · 5 comments
Closed

Comments

@jabirbarber
Copy link

jabirbarber commented May 31, 2018

When zooming out using fingers. If zoomed out beyond minimumZoomScale the app just crashes.
Any quick fixes for this? If not then, iss there a way to reset zoom scale to 1 from within the onScale method?

05-31 14:22:58.101 13718 13718 E MotionEvent-JNI: An exception occurred: pointerCount 1, pointerIndex -1.
05-31 14:22:59.561 13718 13718 E MotionEvent-JNI: An exception occurred: pointerCount 1, pointerIndex -1.
05-31 14:22:59.561 13718 13718 E InputEventReceiver: Exception dispatching input event.
05-31 14:22:59.561 13718 13718 E AndroidRuntime: FATAL EXCEPTION: main
05-31 14:22:59.561 13718 13718 E AndroidRuntime: Process: com.fiftythings.bradford, PID: 13718
05-31 14:22:59.561 13718 13718 E AndroidRuntime: java.lang.IllegalArgumentException: pointerIndex out of range
05-31 14:22:59.561 13718 13718 E AndroidRuntime: at android.view.MotionEvent.nativeGetAxisValue(Native Method)
05-31 14:22:59.561 13718 13718 E AndroidRuntime: at android.view.MotionEvent.getX(MotionEvent.java:2286)
05-31 14:22:59.561 13718 13718 E AndroidRuntime: at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:2064)
05-31 14:22:59.561 13718 13718 E AndroidRuntime: at com.facebook.react.views.viewpager.ReactViewPager.onInterceptTouchEvent(ReactViewPager.java:179)

@aMarCruz
Copy link
Owner

aMarCruz commented Jun 1, 2018

@jabirbarber please include the jsx fragment calling photo-view.

@jabirbarber
Copy link
Author

@aMarCruz

<Swiper> <PhotoView source={{uri: 'file://myuri/one.jpg'}} minimumZoomScale={1} maximumZoomScale={3} androidScaleType="fitCenter" style={{ width: _window.width, height: _window.height }} /> <PhotoView source={{uri: 'file://myuri/two.jpg'}} minimumZoomScale={1} maximumZoomScale={3} androidScaleType="fitCenter" style={{ width: _window.width, height: _window.height }} /> </Swiper>

@tikkichan4
Copy link

I got the same problem too. But it is only crashed in some of images.

@aMarCruz
Copy link
Owner

aMarCruz commented Aug 1, 2018

@jabirbarber m @tikkichan4 ,
I am investigating and in effect, the issue seems to be in the PhotoDraweeView library. Right now I don't have a solution.

@aMarCruz
Copy link
Owner

I'm closing this issue, cannot fix the error right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants