Hey I’m back here, did some more digging into the ...
# compose
d
Hey I’m back here, did some more digging into the issue.. and seems like the issue happens because of using a ConstraintLayout with weights to create the fragments for the master/detail screen. Somehow internally I’m receiving updates on the size of the detail screen and is making the composables to get infinite recompisitions on the width of the screen and so not being idle. Replacing the ConstraintLayout in the xml for a LinearLayout with weights as well the message is more clear:
Copy code
2022-03-17 17:03:24.046 12464-12464/com.compose.playground E/MonitoringInstr: Exception encountered by: Thread[main,5,main]. Dumping thread state to outputs and pining for the fjords.
    java.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed. One of the common reasons is nesting layouts like LazyColumn and Column(Modifier.verticalScroll()). If you want to add a header before the list of items please add a header as a separate item() before the main items() inside the LazyColumn scope. There are could be other reasons for this to happen: your ComposeView was added into a LinearLayout with some weight, you applied Modifier.wrapContentSize(unbounded = true) or wrote a custom layout. Please try to remove the source of infinite constraints in the hierarchy above the scrolling container.
for now I made a workaround to avoid the recomposition fixing the size.. but its not ideal.. any pointers on how to fix this? should I file an issue somewhere?? thanks again! some logs of the recomposition updates:
Copy code
Am I recomposing??
Box boxMaxWidth = 1280.0.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 1280.0.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 1280.0.dp
Box maxWidth2 = 833.5.dp
 Am I recomposing??
Box boxMaxWidth = 833.5.dp, maxWidth = 833.5.dp
Box maxWidth2 = 833.5.dp
and the branch where is reproduced: https://github.com/danimontoya/compose-playground/tree/simplified