Status Update
Comments
ri...@google.com <ri...@google.com> #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
ri...@google.com <ri...@google.com> #3
ri...@google.com <ri...@google.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
di...@gmail.com <di...@gmail.com> #5
That workaround works well for us, thanks a ton! Looking forward to the permanent fix.
ni...@parshipgroup.com <ni...@parshipgroup.com> #6
Are there any updates regarding this issue? We are still facing these crashes in our production app and it seems like the fix was never merged.
ek...@uber.com <ek...@uber.com> #7
We have also been continuing to see this in production. I've updated the sample in comment 0 to the latest BOM and still crashes. Any updates on the fix in the libraries?
ek...@uber.com <ek...@uber.com> #8
Bumping this thread again - the fix in
at...@netflix.com <at...@netflix.com> #9
sa...@google.com <sa...@google.com> #10
an...@google.com <an...@google.com> #11
Sorry, I should've abandoned that CL a while ago — we decided we didn't want to pursue that particular change for some subtle implications that it had.
I think we concluded that a better way to solve this issue on our end is to:
- Add a platform API to expose
ViewOverlay.OverlayViewGroup.mHostView
publicly - Add an appcompat API to backport the hostView property to older SDKs via reflection
- Update
findViewTreeLifecycleOwner()
to traverse the host view of a ViewOverlayGroup instead of its parent
ek...@uber.com <ek...@uber.com> #12
OK - Is that work planned for a future release then?
ek...@uber.com <ek...@uber.com> #13
Checking in on this bug since we're seeing high volumes in production and are considering rolling back Compose features.
an...@google.com <an...@google.com> #14
I've started working on the platform component of the bugfix I mentioned in
Once the androidx changes get published in a CL, they'll be linked here automatically and you can watch the progress more directly. The platform fixes are also technically linked here (see the Pending Code Changes in the right sidebar), but since they're in AOSP they won't be externally visible.
an...@google.com <an...@google.com>
do...@google.com <do...@google.com> #15
Just spoke with Andrew who informed me that the fix is well underway, and the hope is that it'll land within the next 6 weeks.
an...@google.com <an...@google.com> #16
Hey all, quick update here.
We've partially landed this fix. There's
In the short term: You will be able to receive this fix by upgrading to androidx.transition:transition:1.6.0-alpha01
when it is released (Probably in mid-December, but possibly in mid-January because of the upcoming US holidays). That will also upgrade androidx.core:core
to its latest version (which will probably be 1.16.0-alpha01
) and introduce a new dependency on androidx.core:core-viewtree:1.0.0-alpha01
, which is a new module we introduced as part of this change. You will not need to update any Compose dependencies to get the bug fix.
In the long term: We're planning to include a transitive dependency bump as part of the compose-ui 1.9.0 alphas. This bug will stay open until that happens. At some point, this will also work its way into a BOM, but I can't say when. We also can't include this in 1.8.0, unfortunately, because Compose is moving into beta soon, and beta libraries can't depend on core-viewtree
since it's in alpha currently.
ap...@google.com <ap...@google.com> #17
Project: platform/frameworks/support
Branch: androidx-main
Author: Andrew Bailey <
Link:
Set disjoint parents in transition overlays
Expand for full commit details
Set disjoint parents in transition overlays
Test: ComposeViewOverlayTest, in follow-up CL
Bug: b/340894487, b/287484338
Relnote: """
Transition now sets the disjoint parent for ViewOverlays used to
animate its transitions. This allows for the resolution of owners
through the disjoint parent, which means you can now correctly
resolve ViewModels, lifecycles, etc. during a transition.
"""
Change-Id: I10a16c84ba1efbf89a503418889ddd56bb711bed
Files:
- M
fragment/integration-tests/testapp/build.gradle
- M
navigation/integration-tests/testapp/build.gradle
- M
transition/transition-ktx/build.gradle
- M
transition/transition/build.gradle
- M
transition/transition/src/main/java/androidx/transition/GhostViewHolder.java
- M
transition/transition/src/main/java/androidx/transition/TransitionUtils.java
- M
transition/transition/src/main/java/androidx/transition/Visibility.java
Hash: b4846dbfd6e1e98421fe44d673965622fb5e66a4
Date: Wed Jul 31 09:56:27 2024
an...@google.com <an...@google.com> #18
androidx.transition:transition:1.6.0-alpha01
is included in today's androidx release. For everyone running into this issue, please upgrade your transition dependency to this version.
The next steps on our end are to bump the transition version that Compose UI depends on, which needs to wait until we bump the androidx-main branch to Compose 1.9.0-alpha01.
Bugjuggler: wait 2 months
bu...@google.com <bu...@google.com> #19
gb...@netflix.com <gb...@netflix.com> #20
bu...@google.com <bu...@google.com>
br...@target.com <br...@target.com> #21
FYI I'm still seeing this crash with Transition 1.6.0-alpha01.
Stacktrace:
java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.view.ViewOverlay$OverlayViewGroup{2f4358c V.E...... ......ID 0,0-1080,2138}
at androidx.compose.ui.internal.InlineClassHelperKt.throwIllegalStateExceptionForNullCheck(InlineClassHelper.kt:30)
at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer(WindowRecomposer.android.kt:466)
at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer$default(WindowRecomposer.android.kt:327)
at androidx.compose.ui.platform.WindowRecomposerFactory$Companion.LifecycleAware$lambda$0(WindowRecomposer.android.kt:170)
at androidx.compose.ui.platform.WindowRecomposerFactory$Companion.$r8$lambda$FWAPLXs0qWMqekhMr83xkKattCY(Unknown Source:0)
at androidx.compose.ui.platform.WindowRecomposerFactory$Companion$$ExternalSyntheticLambda0.createRecomposer(D8$$SyntheticClass:0)
at androidx.compose.ui.platform.WindowRecomposerPolicy.createAndInstallWindowRecomposer$ui_release(WindowRecomposer.android.kt:226)
at androidx.compose.ui.platform.WindowRecomposer_androidKt.getWindowRecomposer(WindowRecomposer.android.kt:302)
at androidx.compose.ui.platform.AbstractComposeView.resolveParentCompositionContext(ComposeView.android.kt:251)
at androidx.compose.ui.platform.AbstractComposeView.ensureCompositionCreated(ComposeView.android.kt:258)
at androidx.compose.ui.platform.AbstractComposeView.onAttachedToWindow(ComposeView.android.kt:290)
at android.view.View.dispatchAttachedToWindow(View.java:21980)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3490)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.addViewInner(ViewGroup.java:5318)
at android.view.ViewGroup.addView(ViewGroup.java:5104)
at android.view.ViewGroup.addView(ViewGroup.java:5044)
at android.view.ViewGroup.addView(ViewGroup.java:5016)
at android.view.ViewOverlay$OverlayViewGroup.add(ViewOverlay.java:209)
at android.view.ViewGroupOverlay.add(ViewGroupOverlay.java:72)
at androidx.core.view.ViewCompat.addOverlayView(ViewCompat.java:2854)
at androidx.transition.TransitionUtils.createViewBitmap(TransitionUtils.java:103)
at androidx.transition.TransitionUtils.copyViewImage(TransitionUtils.java:64)
at androidx.transition.Visibility.onDisappear(Visibility.java:400)
at androidx.transition.Visibility.createAnimator(Visibility.java:254)
at androidx.transition.Transition.createAnimators(Transition.java:789)
at androidx.transition.TransitionSet.createAnimators(TransitionSet.java:458)
at androidx.transition.TransitionSet.createAnimators(TransitionSet.java:458)
at androidx.transition.Transition.playTransition(Transition.java:1912)
at androidx.transition.TransitionManager$MultiListener.onPreDraw(TransitionManager.java:301)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1176)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3772)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9305)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348)
at android.view.Choreographer.doCallbacks(Choreographer.java:952)
at android.view.Choreographer.doFrame(Choreographer.java:882)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
br...@target.com <br...@target.com> #22
I was able to resolve the specific flavor of the crash described in #21 - the cause was a particular test screen that used android.R.id.content
as a Fragment container for transactions. Setting up that test Activity with an actual layout file with a FragmentContainerView
to host the Fragments resolved the crash.
Description
Jetpack Compose version: 1.4.3
Jetpack Compose component used: UI, ComposeView
Android Studio Build: Android Studio Hedgehog | 2023.1.1 Canary 8 Build #AI-231.9011.34.2311.10290408
Kotlin version: 1.8.10
Steps to Reproduce:
Visibility
Transition
in which the RecyclerView disappears.recyclerView.smoothScrollToPosition()
to reveal the off-screen ComposeView.Sample project attached. Click any item (without scrolling) to run.
I'm seeing this crash infrequently in a production app, and while we should probably avoid calling
smoothScrollToPosition()
on a view that we know is disappearing, this ideally wouldn't crash. Not sure if this is more an issue with RecyclerView or Compose.Stack trace: