Status Update
Comments
jo...@gmail.com <jo...@gmail.com> #2
Jetpack Compose version: 1.5.1, bom: 2023.08.00
Jetpack Compose component(s) used: M3 DatePickerDialog
Android Studio Build: Build #AI-222.4459.24.2221.10121639
Kotlin version: 1.9.0
Steps to Reproduce or Code Sample to Reproduce:
- Create a DatePicker
- Set a min date
- Navigate to the oldest allowed data until the back arrow is disabled
- Navigate month forward
- Navigate back twice (click+click in succession fast)
- Crashes because the second click does not 'see' the disabled state
Stack trace (if applicable): ```
java.lang.IllegalArgumentException: Index should be non-negative (-1)
at androidx.compose.foundation.lazy.layout.LazyAnimateScrollKt$animateScrollToItem$2.invokeSuspend(LazyAnimateScroll.kt:77)
at androidx.compose.foundation.lazy.layout.LazyAnimateScrollKt$animateScrollToItem$2.invoke(Unknown Source:8)
at androidx.compose.foundation.lazy.layout.LazyAnimateScrollKt$animateScrollToItem$2.invoke(Unknown Source:4)
at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2$1.invokeSuspend(ScrollableState.kt:181)
at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2$1.invoke(Unknown Source:8)
at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2$1.invoke(Unknown Source:4)
at androidx.compose.foundation.MutatorMutex$mutateWith$2.invokeSuspend(MutatorMutex.kt:173)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7918)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@76642e4, androidx.compose.runtime.BroadcastFrameClock@f44234d, StandaloneCoroutine{Cancelling}@d52ae02, AndroidUiDispatcher@4c4e313]
so...@google.com <so...@google.com>
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e7be6694bd0db22dbc5e6bed0d318bdca4b9d41a
Author: Shalom Gibly <sgibly@google.com>
Date: Wed Sep 27 04:58:31 2023
Fix a datepicker crash when navigating months fast
Added a try-catch guard to prevent a crash when clicking the navigation
arrows fast and reaching the end of the provided year range.
Opted for a try-catch instead of checking the LasyListState
"isScrollInProgress" for the buttons enablement. Using the in-progress
will disable the buttons until the transition settles, which makes it
hard to navigate by quickly tapping the buttons.
Bug: 290954897
Bug: 297002119
Bug: 290954897
Test: Manual
Relnote: "Fix a DatePicker crash when quickly clicking the navigation
arrow buttons when the displayed month is at the edge of the allowed
range of years."
Change-Id: I46f360883dc57d677a545863ff2d913903861928
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DatePicker.kt
https://android-review.googlesource.com/2762529
Branch: androidx-main
commit e7be6694bd0db22dbc5e6bed0d318bdca4b9d41a
Author: Shalom Gibly <sgibly@google.com>
Date: Wed Sep 27 04:58:31 2023
Fix a datepicker crash when navigating months fast
Added a try-catch guard to prevent a crash when clicking the navigation
arrows fast and reaching the end of the provided year range.
Opted for a try-catch instead of checking the LasyListState
"isScrollInProgress" for the buttons enablement. Using the in-progress
will disable the buttons until the transition settles, which makes it
hard to navigate by quickly tapping the buttons.
Bug: 290954897
Bug: 297002119
Bug: 290954897
Test: Manual
Relnote: "Fix a DatePicker crash when quickly clicking the navigation
arrow buttons when the displayed month is at the edge of the allowed
range of years."
Change-Id: I46f360883dc57d677a545863ff2d913903861928
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DatePicker.kt
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.2.0-alpha10
androidx.compose.material3:material3-android:1.2.0-alpha10
androidx.compose.material3:material3-desktop:1.2.0-alpha10
Description
Description has been deleted.