alirezat775/carousel-view

Fatal Exception: java.lang.IllegalArgumentException Cannot set 'scaleX' to Float.NaN

tomafc330 opened this issue · 2 comments

Describe the bug
We are seeing in production crashlytics: Fatal Exception: java.lang.IllegalArgumentException
Cannot set 'scaleX' to Float.NaN

Stacktrace:

Fatal Exception: java.lang.IllegalArgumentException
Cannot set 'scaleX' to Float.NaN
android.view.View.sanitizeFloatPropertyValue (View.java:18167)
android.view.View.setScaleX (View.java:17494)
alirezat775.lib.carouselview.CarouselLayoutManager.scrollHorizontallyBy (CarouselLayoutManager.java:105)
alirezat775.lib.carouselview.CarouselLayoutManager.onLayoutChildren (CarouselLayoutManager.java:50)
androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2 (RecyclerView.java:4141)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1076)

I think if scale is NaN, we just need to set it to 1 so it doesn't throw the nasty exception @alirezat775

Hi @tommytcchan,
Would you please explain your implementation?
Are you using slider mode?