Fixed
Status Update
Comments
ja...@google.com <ja...@google.com> #2
Also spent a good chunk of time debugging memory leaks in our apps and discovered the same thing. Upgraded all the way to `compose:1.3.0-alpha03` and `activity-compose:1.6.0-beta01` with the same leaks.
ja...@google.com <ja...@google.com> #3
This is a significant issue. Every app that integrates compose with an Activity will leak that Activity.
We automated a test to switch back and forth to an Activity for about 15 minutes. Attached screenshots of our results.
170 Leaks for referencing compose `setContentView` inside an Activity.
We automated a test to switch back and forth to an Activity for about 15 minutes. Attached screenshots of our results.
170 Leaks for referencing compose `setContentView` inside an Activity.
ja...@google.com <ja...@google.com> #4
To workaround, we switched to Compose Navigation, which uses a single Activity. - https://developer.android.com/jetpack/compose/navigation
We ran the same automated test switch back and forth between screens for about 15 mins. Attached screenshots of our results.
0 Leaks.
We ran the same automated test switch back and forth between screens for about 15 mins. Attached screenshots of our results.
0 Leaks.
ja...@google.com <ja...@google.com> #5
Are there any updates on this issue?
Our app relies on a lot of interop with ComposeView, and this leak has been causing issues and slowing down our integration with Compose.
Any help is much appreciated!
an...@google.com <an...@google.com>
ch...@google.com <ch...@google.com> #6
This is a huge bug and the memory keeps growing
ap...@google.com <ap...@google.com> #7
Do we know if this is fixed in Compose 1.3.0
or 1.3.1
?
Has anyone (or OP) tried repro-ing with those versions yet?
Thanks
Description
Jetpack Compose release version: 1.0.0-rc01
androidGradlePlugin "com.android.tools.build:gradle:7.1.0-alpha02" and "com.android.tools.build:gradle:7.0.0-beta04"
Accompanist version = "0.13.0"
Android Studio Build: Bumblebee canary 2 and AF beta3
Jetchat version v1.0.0-rc01 ->
Emulator used: Pixel 2 API 30
Steps to Reproduce:
1. Open Jetchat
2. Open Profile screen (through drawer or clicking on avatar)
3. Rotate device
This is a regression.
Crash:
java.lang.IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied
at androidx.compose.runtime.snapshots.SnapshotKt.readError(Snapshot.kt:1530)
at androidx.compose.runtime.snapshots.SnapshotKt.readable(Snapshot.kt:1526)
at androidx.compose.runtime.snapshots.SnapshotKt.readable(Snapshot.kt:1517)
at androidx.compose.runtime.SnapshotMutableStateImpl.getValue(SnapshotState.kt:143)
at com.google.accompanist.insets.InsetsPaddingValues.getAdditionalStart-D9Ej5fM(Padding.kt:345)
at com.google.accompanist.insets.InsetsPaddingValues.calculateLeftPadding-u2uoSUM(Padding.kt:299)
at androidx.compose.foundation.layout.PaddingValuesModifier$measure$2.invoke(Padding.kt:423)
at androidx.compose.foundation.layout.PaddingValuesModifier$measure$2.invoke(Padding.kt:421)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:68)
at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-f8xVGno(DelegatingLayoutNodeWrapper.kt:111)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:31)
at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative(Placeable.kt:359)
at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative$default(Placeable.kt:179)
at androidx.compose.foundation.layout.PaddingModifier$measure$1.invoke(Padding.kt:370)
at androidx.compose.foundation.layout.PaddingModifier$measure$1.invoke(Padding.kt:368)
(full trace attached)