Status Update
Comments
an...@tomorrow.one <an...@tomorrow.one> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
le...@google.com <le...@google.com>
le...@google.com <le...@google.com>
le...@google.com <le...@google.com>
va...@gmail.com <va...@gmail.com> #3
fe...@gmail.com <fe...@gmail.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
jo...@google.com <jo...@google.com>
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit 51900c870dcafca33f1dfddf9ecd4e711d36e914
Author: Jossi Wolf <jossiwolf@google.com>
Date: Tue May 07 17:39:14 2024
Coerce Pager's page size to min 0
In some cases, we could previously end up with a negative size returned from PageSize. There were two scenarios:
- Custom PageSize implementation returning a negative value
- PageSize.Fill (the default size) returning the incoming value, which could be negative if the content padding is bigger than the constraints' main axis space
Relnote: Fixed a bug where Pager would crash when the contentPadding was bigger than the incoming constraints. Pager now coerces negative values returned from PageSize to 0.
Test: contentPadding_largerThanConstraints_measuresAsZero, pageSize_smallerThanAvailableSpace_measuresAsZero
Bug: 314008560
Change-Id: Iba5d8eccddaf1a49bb09dc4f93d8a4f38276d60b
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/PagerMeasurePolicy.kt
jo...@google.com <jo...@google.com>
ra...@inmobi.com <ra...@inmobi.com> #6
jo...@google.com <jo...@google.com> #7
This fix is included in tip of tree, you can try it out by using a snapshot build (androidx.dev). We have an automated integration that will add a comment once this change has been included in a release.
pr...@google.com <pr...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.7.0-beta01
androidx.compose.foundation:foundation-android:1.7.0-beta01
androidx.compose.foundation:foundation-desktop:1.7.0-beta01
wi...@kakaomobility.com <wi...@kakaomobility.com> #9
I'm using compose 1.6.3 and I got crash when update content padding to lager value. ex) Portrait -> Landscape.
To workaround this problem, I updated pager before adjusting the content padding. It seems worthless, but worked well.
val contentPadding = remember { mutableStateOf(10000.dp) }
val newContentPadding = calcPadding()
val scope = rememberCoroutineScope()
if (newContentPadding <= contentPadding.value) { // smaller padding : no problem
contentPadding.value = newContentPadding
} else { // larger padding : crash!
scope.launch {
pagerState.scrollToPage(pagerState.currentPage) // update pager
contentPadding.value = newContentPadding // then update padding
}
}
ga...@gmail.com <ga...@gmail.com> #10
We're still seeing high volumes of this in 1.7.0
fi...@gmail.com <fi...@gmail.com> #11
I encountered similar exception on Nothing Phone (1) @ API 34 with ComposeView inside CardView. Opens normally, then 100% reproducible when switching day/night mode, probably other layout recreations will do. Didn't crash tho on neither of AVD Pixel API 35, redmi 10 API 31, samsung a70 api 30.
For me WORKAROUND was to add android:layout_marginTop="0dp"
to ComposeView, I hope it'll help someone.
My xml: ConstraintLayout(root) > LinearLayout(wrap_content) > CardView(wrap_content) > ComposeView(wrap_content)
Sorry if that does not make sense lol, but works as expected with various non-compose children. I thought it might be relevant since ConstraintLayout is also present.
kotlin = "2.0.21"
appcompat = "1.7.0"
activityCompose = "1.9.3"
composeBom = "2024.10.00"
java.lang.IllegalArgumentException: maxWidth(-252) must be >= than minWidth(0)
at androidx.compose.ui.unit.InlineClassHelperKt.throwIllegalArgumentException(InlineClassHelper.kt:30)
at androidx.compose.ui.unit.ConstraintsKt.Constraints(Constraints.kt:721)
at androidx.compose.ui.unit.ConstraintsKt.Constraints$default(Constraints.kt:543)
at androidx.compose.ui.node.NodeMeasuringIntrinsics.minHeight$ui_release(LayoutModifierNode.kt:297)
at androidx.compose.ui.node.LayoutModifierNode.minIntrinsicHeight(LayoutModifierNode.kt:95)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.minIntrinsicHeight(LayoutModifierNodeCoordinator.kt:220)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.minIntrinsicHeight(LayoutNodeLayoutDelegate.kt:912)
at androidx.compose.material3.ListItemMeasurePolicy.measure-3p2s80s(ListItem.kt:234)
at androidx.compose.ui.layout.MultiContentMeasurePolicyImpl.measure-3p2s80s(MultiContentMeasurePolicy.kt:209)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:135)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:316)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:315)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:503)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:502)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:258)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:113)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:1782)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate.access$performMeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:40)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:696)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:672)
at androidx.compose.foundation.layout.BoxMeasurePolicy.measure-3p2s80s(Box.kt:151)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:135)
at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:646)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:188)
at androidx.compose.animation.SizeAnimationModifierNode.measure-3p2s80s(AnimationModifier.kt:195)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:188)
at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier.measure-3p2s80s(GraphicsLayerModifier.kt:646)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:188)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:316)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:315)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:503)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:502)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:258)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:113)
jo...@google.com <jo...@google.com> #12
Hi, can you please share a reproduction case with us?
fi...@gmail.com <fi...@gmail.com> #13
I realized later it stopped reproducing after minor changes in code not even close to UI, which I had to add to try other devices (the Card contained play integrity error specific to Nothing). This was midcommit, I tried to recover setup, but failed.
Idk, maybe it was related more to build cache issues, rather than view/compose interop.
If I catch it again, I come back
jo...@google.com <jo...@google.com> #14
#13, thanks!
#10, please let us know if you have a repro case for us!
Description
Affected compose versions:
Suspected Jetpack Compose components:
Kotlin version: 1.9.20
The crash is not reproducible and we can’t figure out the app code origin
Stack trace (if applicable):