[Slider] IllegalStateException validateValues
See original GitHub issueAs it states in the title it’s crashing randomly in a few devices. I can’t reproduce on all my ~20 devices with different SDK and OEMs, but I can see it on my console. I have no clue how this is possible even after checking the source code of the component.
I can see this crash in different apis, such as Android 10, 9 and 8.1, though I can see no correlation of being caused by the sdk version since there’s no pattern. I don’t even know where this is crashing on my code to be honest, specially because I can’t reproduce on my debug builds.
Any hint? More than happy to provide more information as it’s needed. Thanks.
java.lang.IllegalStateException:
at com.google.android.material.slider.Slider.validateValues (Slider.java:517)
at com.google.android.material.slider.Slider.validateConfigurationIfDirty (Slider.java:530)
at com.google.android.material.slider.Slider.calculateTicksCoordinates (Slider.java:1329)
at com.google.android.material.slider.Slider.onSizeChanged (Slider.java:1322)
at android.view.View.sizeChange (View.java:19792)
at android.view.View.setFrame (View.java:19753)
at android.view.View.layout (View.java:19656)
at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1791)
at android.widget.LinearLayout.layoutHorizontal (LinearLayout.java:1780)
at android.widget.LinearLayout.onLayout (LinearLayout.java:1546)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout (LinearLayout.java:1544)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout (LinearLayout.java:1544)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.FrameLayout.layoutChildren (FrameLayout.java:323)
at android.widget.FrameLayout.onLayout (FrameLayout.java:261)
at android.widget.ScrollView.onLayout (ScrollView.java:1552)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.FrameLayout.layoutChildren (FrameLayout.java:323)
at android.widget.FrameLayout.onLayout (FrameLayout.java:261)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.FrameLayout.layoutChildren (FrameLayout.java:323)
at android.widget.FrameLayout.onLayout (FrameLayout.java:261)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at androidx.coordinatorlayout.widget.CoordinatorLayout.layoutChild (CoordinatorLayout.java:1213)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild (CoordinatorLayout.java:899)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout (CoordinatorLayout.java:919)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.FrameLayout.layoutChildren (FrameLayout.java:323)
at android.widget.FrameLayout.onLayout (FrameLayout.java:261)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout (LinearLayout.java:1544)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.FrameLayout.layoutChildren (FrameLayout.java:323)
at android.widget.FrameLayout.onLayout (FrameLayout.java:261)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout (LinearLayout.java:1544)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.widget.FrameLayout.layoutChildren (FrameLayout.java:323)
at android.widget.FrameLayout.onLayout (FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout (DecorView.java:761)
at android.view.View.layout (View.java:19659)
at android.view.ViewGroup.layout (ViewGroup.java:6075)
at android.view.ViewRootImpl.performLayout (ViewRootImpl.java:2496)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2212)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1392)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:6752)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:911)
at android.view.Choreographer.doCallbacks (Choreographer.java:723)
at android.view.Choreographer.doFrame (Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:897)
at android.os.Handler.handleCallback (Handler.java:790)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6494)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:22 (10 by maintainers)
Top Results From Across the Web
How to get value from new android material design Slider
Using new material design slider com.google.android.material.slider.Slider . The documentation is quite poor for it as it has been just ...
Read more >Developers - Slider crash - - Bountysource
IllegalStateException : Value(45.0) must be equal to valueFrom(0.0) plus a multiple of ... validateValues(BaseSlider.java:502) at ...
Read more >Slider - Android Developers
A widget that allows picking a value within a given range by sliding a thumb along a horizontal line. android:value : Optional.
Read more >Bug List - Bugs - Eclipse.org
570346, Platform, SWT, sdamrong, VERI, FIXE, [GTK4] Port Slider snippets, 2021-02-16 ... [CSS] Setting a property to 'inherit' fires a IllegalStateException ...
Read more >Kotlin Language Documentation 1.7.21
IllegalStateException : at 0 example.kexe 0x227190 ... (chunked), sliding window and computing sliding average (windowed) , and processing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@franciscofranco have you had any luck with this issue?
@pekingme easy way to reproduce that, add a wrapper (a layout or such) to an activity and change visibility to “GONE”. Now add a slider to that layout. Set the slider min to 1.0 and the value to any you see fit. Create a button that takes the visibility to “VISIBLE”. With a pixel handy e.g. this won’t have any issues but e.g. on Samsung this will crash with the attached log from various developers before.