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

Cannot set 'scaleX' to Float.NaN #217

Open
chengfan2017 opened this issue Dec 23, 2021 · 5 comments
Open

Cannot set 'scaleX' to Float.NaN #217

chengfan2017 opened this issue Dec 23, 2021 · 5 comments

Comments

@chengfan2017
Copy link

No description provided.

@chengfan2017
Copy link
Author

This exception occurs from time to time. Is this a bug?

@ZeeOne
Copy link

ZeeOne commented Jan 4, 2022

Also got this. Don't know if there is perhaps an xml value or something i should have set?

Fatal Exception: java.lang.IllegalArgumentException: Cannot set 'scaleX' to Float.NaN
       at android.view.View.sanitizeFloatPropertyValue(View.java:16693)
       at android.view.View.sanitizeFloatPropertyValue(View.java:16667)
       at android.view.View.setScaleX(View.java:16017)
       at com.otaliastudios.zoom.ZoomLayout.onUpdate(ZoomLayout.java:46)
       at com.otaliastudios.zoom.ZoomLayout.access$onUpdate(ZoomLayout.java)
       at com.otaliastudios.zoom.ZoomLayout$1.onUpdate(ZoomLayout.java:12)
       at com.otaliastudios.zoom.internal.UpdatesDispatcher.dispatchOnMatrix$library_release(UpdatesDispatcher.java:24)
       at com.otaliastudios.zoom.ZoomEngine$Callbacks.onMatrixUpdate(ZoomEngine.java:6)
       at com.otaliastudios.zoom.internal.matrix.MatrixController.dispatch(MatrixController.java:2)
       at com.otaliastudios.zoom.internal.matrix.MatrixController.applyUpdate$library_release(MatrixController.java:216)
       at com.otaliastudios.zoom.internal.matrix.MatrixController.applyUpdate$library_release(MatrixController.java:11)
       at com.otaliastudios.zoom.internal.gestures.ScrollFlingDetector.onScroll(ScrollFlingDetector.java:335)
       at android.view.GestureDetector.onTouchEvent(GestureDetector.java:726)
       at com.otaliastudios.zoom.internal.gestures.ScrollFlingDetector.maybeStart$library_release(ScrollFlingDetector.java:7)
       at com.otaliastudios.zoom.ZoomEngine$Callbacks.maybeStartScrollFlingGesture(ZoomEngine.java:11)
       at com.otaliastudios.zoom.internal.StateController.processTouchEvent(StateController.java:57)
       at com.otaliastudios.zoom.internal.StateController.onTouchEvent$library_release(StateController.java:5)
       at com.otaliastudios.zoom.ZoomEngine.onTouchEvent(ZoomEngine.java:7)
       at com.otaliastudios.zoom.ZoomLayout.onTouchEvent(ZoomLayout.java:7)
       at android.view.View.dispatchTouchEvent(View.java:13503)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3067)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2752)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3073)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2766)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3073)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2766)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3073)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2766)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3073)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2766)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3073)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2766)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3073)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2766)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3073)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2766)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3073)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2766)
       at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:613)
       at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1933)
       at android.app.Activity.dispatchTouchEvent(Activity.java:4147)
       at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:2)
       at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:559)
       at android.view.View.dispatchPointerEvent(View.java:13766)
       at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5824)
       at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5619)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5063)
       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5116)
       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5082)
       at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5239)
       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5090)
       at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5296)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5063)
       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5116)
       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5082)
       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5090)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5063)
       at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7954)
       at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7905)
       at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7859)
       at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8144)
       at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:233)
       at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(InputEventReceiver.java)
       at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:215)
       at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:8071)
       at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:8187)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1057)
       at android.view.Choreographer.doCallbacks(Choreographer.java:875)
       at android.view.Choreographer.doFrame(Choreographer.java:769)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1042)
       at android.os.Handler.handleCallback(Handler.java:888)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:213)
       at android.app.ActivityThread.main(ActivityThread.java:8178)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)

@xi-trackview
Copy link

xi-trackview commented Mar 11, 2022

Fatal Exception: java.lang.IllegalArgumentException
Cannot set 'scaleX' to Float.NaN
android.view.View.sanitizeFloatPropertyValue (View.java:16691)
android.view.View.sanitizeFloatPropertyValue (View.java:16665)
android.view.View.setScaleX (View.java:16013)
com.otaliastudios.zoom.ZoomLayout.onUpdate (ZoomLayout.kt:156)
com.otaliastudios.zoom.ZoomLayout.access$onUpdate (ZoomLayout.kt:28)
com.otaliastudios.zoom.ZoomLayout$1.onUpdate (ZoomLayout.kt:71)
com.otaliastudios.zoom.internal.UpdatesDispatcher.dispatchOnMatrix$zoomlayout_release (UpdatesDispatcher.kt:22)
com.otaliastudios.zoom.ZoomEngine$Callbacks.onMatrixUpdate (ZoomEngine.kt:89)
com.otaliastudios.zoom.internal.matrix.MatrixController.dispatch (MatrixController.kt:214)
com.otaliastudios.zoom.internal.matrix.MatrixController.applyUpdate$zoomlayout_release (MatrixController.kt:276)
com.otaliastudios.zoom.internal.matrix.MatrixController.applyUpdate$zoomlayout_release (MatrixController.kt:234)
com.otaliastudios.zoom.internal.gestures.ScrollFlingDetector.onScroll (ScrollFlingDetector.kt:207)
android.view.GestureDetector.onTouchEvent (GestureDetector.java:700)
com.otaliastudios.zoom.internal.gestures.ScrollFlingDetector.maybeStart$zoomlayout_release (ScrollFlingDetector.kt:51)
com.otaliastudios.zoom.ZoomEngine$Callbacks.maybeStartScrollFlingGesture (ZoomEngine.kt:151)
com.otaliastudios.zoom.internal.StateController.processTouchEvent (StateController.kt:106)
com.otaliastudios.zoom.internal.StateController.onTouchEvent$zoomlayout_release (StateController.kt:89)
com.otaliastudios.zoom.ZoomEngine.onTouchEvent (ZoomEngine.kt:676)
com.otaliastudios.zoom.ZoomLayout.onTouchEvent (ZoomLayout.kt:145)

It occours on Android 10(95%) and Android 11(5%), lib is 1.8.0

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had activity in the last 20 days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.

@stale stale bot added status:stale and removed status:stale labels Apr 16, 2022
Repository owner deleted a comment from chengfan2017 Jan 29, 2023
@oOJohn6Oo
Copy link

If you get a crash when calling setHasClickableChildren(true) in onBindViewHolder, move your code to onCreateViewHolder.

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

4 participants