Status Update
Comments
rk...@google.com <rk...@google.com>
rk...@google.com <rk...@google.com> #2
Hi, thanks for report!
Could you attach a bit more information about the heap at this point (e.g. a heap dump) if the leak is not reproducible in trivial project?
rk...@google.com <rk...@google.com>
cm...@gmail.com <cm...@gmail.com> #4
I looked into the heap dump, seems like we are not disposing certain snapshots. Current snapshot id seems to be around 42k, but we have 108, 116 and 14123 in invalid SnapshotIdSet
for current global snapshot.
It is hard to figure out what caused it without repro though, as those snapshots seem to be already collected by GC.
rk...@google.com <rk...@google.com> #5
I managed to repro it after a bunch of debugging. The bad news is that it's caused when using
Repro:
- Add
implementation io.coil-kt:coil-compose:2.1.0
to build.gradle - Add the following composable:
@Composable fun Leak() {
val lazyListState = rememberLazyListState()
val items by remember { mutableStateOf(List(10000) { it }) }
LazyColumn(state = lazyListState) {
items(items) {
Box(Modifier.fillMaxWidth()) {
AsyncImage(
model = "https://i.picsum.photos/id/104/200/200.jpg?hmac=3XxEVXVjwoI45-6sum_iMwNZ52GT-SJacVWr4fh4hqI",
contentDescription = null
)
}
}
}
}
- Scroll
- Memory 📈
cm...@gmail.com <cm...@gmail.com> #6
Branch: androidx-main
commit e82b3518094e5451dd4697f31a412c10075b28c5
Author: Andrei Shikov <ashikov@google.com>
Date: Wed Jul 20 23:43:58 2022
Dispose nested snapshots created from transparent snapshots
Adds a flag to transparent snapshots to "manage" wrapped snapshots which forces dispose of the wrapped snapshot whenever transparent one is disposed.
This flag is only enabled for the snapshots taken inside transparent snapshots, fixing memory leaks in certain conditions.
Fixes a minor bug where transparent snapshot wasn't receiving reads from nested snapshots as well.
Fixes: 239603305
Test: SnapshotTests#testNestedWithinTransparentSnapshotDisposedCorrectly
Change-Id: I62eddd279c8cf44b032d852d646c9ba21ad08a39
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/Snapshot.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/snapshots/SnapshotTests.kt
rk...@google.com <rk...@google.com> #7
Thanks for the quick turnaround!
cm...@gmail.com <cm...@gmail.com> #8
The following release(s) address this bug:
androidx.compose.runtime:runtime:1.3.0
rk...@google.com <rk...@google.com> #9
Where is this emulator build number
Click the "..." (three dots on the emulator panel), then "Help", then "About".
As the emulator update, where is the place to download the image zip files.
cm...@gmail.com <cm...@gmail.com> #10
Thanks for the info.
Yes, my current emulator is 32.1.12-9751036, after updated the emulator version, the mic settings persistent saving is working now.
Also the mic is also working for API-33 when enabled.
By the way, any reason why I did not get a notification to update the emulator. I believe it was so in the past. Did I accidentally disabled the auto update option.
Thanks for the help.
rk...@google.com <rk...@google.com> #11
By the way, any reason why I did not get a notification to update the emulator.
I am not sure, as the SDK Manager is a different component. Yes, 32.x.x is somewhat old.
Description