Status Update
Comments
el...@gmail.com <el...@gmail.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
to...@gmail.com <to...@gmail.com> #3
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #4
ra...@google.com <ra...@google.com>
da...@gmail.com <da...@gmail.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
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?