Status Update
Comments
el...@gmail.com <el...@gmail.com> #2
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
to...@gmail.com <to...@gmail.com> #3
Got the same crash on Compose 1.5 alpha 01.
Strangely it seems to only touch Android 9 for me (The app is Android 9 min so maybe it's <=9)
Fatal Exception: java.lang.IllegalStateException: Check failed.
at androidx.compose.ui.focus.FocusTargetModifierNode.fetchFocusProperties$ui_release(FocusTargetModifierNode.kt:191)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.collectAccessibleChildren(TwoDimensionalFocusSearch.kt:189)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.collectAccessibleChildren(TwoDimensionalFocusSearch.kt:192)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.collectAccessibleChildren(TwoDimensionalFocusSearch.kt:192)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.findChildCorrespondingToFocusEnter--OM-vw8(TwoDimensionalFocusSearch.kt:103)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.twoDimensionalFocusSearch--OM-vw8(TwoDimensionalFocusSearch.kt:84)
at androidx.compose.ui.focus.FocusTraversalKt.focusSearch-sMXa3k8(FocusTraversal.kt:111)
at androidx.compose.ui.focus.FocusOwnerImpl.moveFocus-3ESFkO8(FocusOwnerImpl.kt:162)
at androidx.compose.ui.platform.AndroidComposeView$keyInputModifier$1.invoke-ZmokQxo(AndroidComposeView.android.kt:211)
at androidx.compose.ui.platform.AndroidComposeView$keyInputModifier$1.invoke(AndroidComposeView.android.kt:206)
at androidx.compose.ui.input.key.KeyInputInputModifierNodeImpl.onKeyEvent-ZmokQxo(KeyInputModifierNode.kt:92)
at androidx.compose.ui.focus.FocusOwnerImpl.dispatchKeyEvent-ZmokQxo(FocusOwnerImpl.kt:193)
at androidx.compose.ui.platform.AndroidComposeView.sendKeyEvent-ZmokQxo(AndroidComposeView.android.kt:636)
at androidx.compose.ui.platform.AndroidComposeView.dispatchKeyEvent(AndroidComposeView.android.kt:644)
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #4
Branch: androidx-main
commit 4e698f033af3e4add494a48213ce2b5e3236453c
Author: Ralston Da Silva <ralu@google.com>
Date: Tue Apr 18 13:29:24 2023
Fix crash in TvLazyList
This fixes and re-enables the failing lazy list test.
Bug: 268211857
Bug: 270277273
Bug: 271324781
Bug: 274897776
Test: Re-enabled the ignored test
Change-Id: I2436c2a6b585e0063ad87d4852404f7fcc0cb8f0
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/TwoDimensionalFocusSearch.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListTest.kt
ra...@google.com <ra...@google.com>
da...@gmail.com <da...@gmail.com> #5
Or a recommended version to downgrade to?
ra...@google.com <ra...@google.com> #6
This will be cherry picked onto 1.4 and will be available in the next bi-weekly release.
na...@google.com <na...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.4.3
he...@gmail.com <he...@gmail.com> #8
This bug still exists with androidx.compose.ui:ui:1.4.3
:
java.lang.IllegalStateException: Check failed.
at androidx.compose.ui.focus.FocusTargetModifierNode.fetchFocusProperties$ui_release(FocusTargetModifierNode.kt:197)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.collectAccessibleChildren(TwoDimensionalFocusSearch.kt:189)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.collectAccessibleChildren(TwoDimensionalFocusSearch.kt:192)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.findChildCorrespondingToFocusEnter--OM-vw8(TwoDimensionalFocusSearch.kt:103)
at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.twoDimensionalFocusSearch--OM-vw8(TwoDimensionalFocusSearch.kt:84)
at androidx.compose.ui.focus.FocusTraversalKt.focusSearch-sMXa3k8(FocusTraversal.kt:106)
at androidx.compose.ui.focus.FocusOwnerImpl.moveFocus-3ESFkO8(FocusOwnerImpl.kt:162)
at androidx.compose.ui.platform.AndroidComposeView$keyInputModifier$1.invoke-ZmokQxo(AndroidComposeView.android.kt:206)
at androidx.compose.ui.platform.AndroidComposeView$keyInputModifier$1.invoke(AndroidComposeView.android.kt:201)
at androidx.compose.ui.input.key.KeyInputModifierNodeImpl.onKeyEvent-ZmokQxo(KeyInputModifier.kt:80)
at androidx.compose.ui.focus.FocusOwnerImpl.dispatchKeyEvent-ZmokQxo(FocusOwnerImpl.kt:193)
at androidx.compose.ui.platform.AndroidComposeView.dispatchKeyEvent(AndroidComposeView.android.kt:646)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1965)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1965)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1965)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1965)
at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:486)
at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1889)
at android.app.Activity.dispatchKeyEvent(Activity.java:4222)
at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.java:122)
at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:85)
at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:140)
at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:400)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:6500)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6366)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5826)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5883)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5849)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6014)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5857)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6071)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5830)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5883)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5849)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5857)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5830)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5883)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5849)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6047)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:6227)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3741)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:3261)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:3252)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3718)
at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:161)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
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)
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.5.0-alpha04
he...@gmail.com <he...@gmail.com> #10
Issue is fixed with 1.5.0-alpha04
pa...@geocaching.com <pa...@geocaching.com> #11
mr...@gmail.com <mr...@gmail.com> #12
pl...@google.com <pl...@google.com> #13
To the authors of
mr...@gmail.com <mr...@gmail.com> #14
FATAL EXCEPTION: main Process: sampleapp.tv.debug, PID: 10202 java.lang.IllegalStateException: Check failed. at androidx.compose.ui.focus.FocusTargetModifierNode.fetchFocusProperties$ui_release(FocusTargetModifierNode.kt:197) at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.collectAccessibleChildren(TwoDimensionalFocusSearch.kt:189) at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.collectAccessibleChildren(TwoDimensionalFocusSearch.kt:192) at androidx.compose.ui.focus.TwoDimensionalFocusSearchKt.findChildCorrespondingToFocusEnter--OM-vw8(TwoDimensionalFocusSearch.kt:103) at androidx.compose.ui.focus.FocusRequester.focus$ui_release(FocusRequester.kt:74) at androidx.compose.ui.focus.FocusRequester.requestFocus(FocusRequester.kt:63) at androidx.tv.material3.NavigationDrawerKt$DrawerSheet$2$1.invokeSuspend(NavigationDrawer.kt:249) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 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:7898) 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.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@fc1e6d, androidx.compose.runtime.BroadcastFrameClock@1ec5aa2, StandaloneCoroutine{Cancelling}@8c2333, AndroidUiDispatcher@ad6b6f0]
mr...@gmail.com <mr...@gmail.com> #15
In my case its happening when using a NavigationDrawer from androidx.tv.material3. reproduction steps are easy, let the Navigation drawer gain focus and then move the focus to something else, try go back to Navigation drawer and boom!
pa...@geocaching.com <pa...@geocaching.com> #16
Good news - The crash is now resolved for us. We had been declaring each Compose dependency individually in our build.gradle. I updated all of our Compose dependencies to the latest available versions, including androidx.compose.ui:ui:1.5.0-alpha04. This did not resolve the issue for us. Finally, I switched over to using the Compose BoM (2023.04.01), and that fixed it! Interestingly, that version of the BoM is using version 1.4.2 of Compose UI. I hope this may help others who are still experiencing the crash.
pr...@google.com <pr...@google.com> #17
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-foundation:1.0.0-alpha07
ir...@gmail.com <ir...@gmail.com> #18
```kotlin
Box(
modifier = Modifier
.clickable(false) {}
) {
SelectionContainer {
Text(
text = value,
fontSize = 18.sp,
color = MaterialTheme.colors.normalTextColor,
overflow = TextOverflow.Ellipsis,
maxLines = 2
)
}
}
```
bb...@jeniusbank.com <bb...@jeniusbank.com> #19
To add to .clickable(enabled = true)
then the user long presses to highlight text, and the state is changed to false
, or if you change the text in some way (ex. from another button) an exception is thrown. This is the same exception that is thrown when long pressing and the .clickable
is set to false
java.lang.IllegalStateException: Cannot read CompositionLocal because the Modifier node is not currently attached.
Using a combinedClickable
in the same manner crashes with the same exceptions.
Description
1.4.0
1.8.10
Unfortunately I have not managed to create a reproducible example or certain steps to recreate this. I will update more details in response if I can find out more details.
Stack trace 1
In this case
moveFocus
was called by the framework in response to a key press.Stack trace 2
In this case
LocalFocusManager.current.moveFocus(FocusDirection.Enter)
was manually called from application code.Both traces seem to have
twoDimensionalFocusSearch
in the stack only once, which to my understanding would indicate the focus search is beginning from the root of the hierarchy. I am not yet familiar with the Modifier Node architecture, but this would seem to indicate that the root node is for some reason detached from the layout?