New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double "place" and "measure" calls in specific setting with background threads #1548
Comments
+1 |
Probably it is a commonMain issue: https://issuetracker.google.com/issues/208855077. Will check the example there |
Apparently upstream fixed their issues with https://android-review.googlesource.com/c/platform/frameworks/support/+/1914851/. Would be nice to have a new version of compose MP including these fixes soon. |
When will 1.01 be released ? |
There is no specific scheduled date yet. Does this issue affect your project severely? |
Thanks,I used a workaround so it's not very serious , But I hope to see the new version soon😄 |
In our case we just sticked to the last version of Compose that didn't expose this bug. It would be nice to be able to upgrade to a stable version, but we have no particular hurry until, let's say, the first week of January. |
We have created intermediate dev build - 1.0.1-rc1. It contains the fix from the upstream, you could check if it solves your issues. |
I removed the workaround and It works well, Thanks ! |
Fixed in 1.0.1-rc1+ |
Just tried the new dev version and it works like a charm! Thanks a lot for your fast reaction, that's amazing! 🎉 |
While trying to move our code from
1.0.0-beta5
to1.0.0
, we (eventually) face the following (rather mysterious) exception. Unfortunately, I was unable to find a small reproducer yet that does not use our code under the hood and I'm thus not sure if it is a problem on our side that became only apparent after the changes in Compose or if it is actually a regression in Compose.Just to provide some background on when this exception has been encountered: All our database calls are executed on a single separate thread to avoid concurrency issues in the database (this design is inherited from a part we use under the hood, so it cannot be easily changed). When selecting an item in a list, a
State
object is updated whose valuex
is passed to a second composable function. This function usesLaunchedEffect(x)
to retrieve data from the database dependent onx
in two different callbacks executed on the DB thread. The data (a text and a list) is saved in otherMutableState
objects from within the callbacks and displayed in Composables, aText
and aLazyColumn
containingRow { Text() }
orBox { Text() }
. The exception occurs (sometimes) when switching to a different item in the first list. Interestingly, when removing theRow
or theBox
in the (second) list items, I was unable to trigger the exception.I also tried to find out starting from which Compose version the problem first arises: It is still working fine with
1.0.0-beta6-dev464
but crashes with1.0.0-beta6-dev474
. Unfortunately, there is a rather large changeset between those two versions (see here and especially here). As the stacktrace and exception look rather mysterious to me, I tried to debug the code (setting a breakpoint to inspect the variables just before the exception is thrown) to find out which part of the layout is actually tried to be recomposed, but I couldn't find this information in the call stack. Is there some way to debug internal Compose calls to (e.g.) find out what is "placed" and "measured" twice? Or does someone have an idea what could cause the problem? Might it perhaps be related to changes in the pointer events API between those two compose versions?The exception(s):
The text was updated successfully, but these errors were encountered: