Fixed
Status Update
Comments
rv...@google.com <rv...@google.com>
rv...@google.com <rv...@google.com>
rv...@google.com <rv...@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?
ap...@google.com <ap...@google.com> #3
Attached!
rv...@google.com <rv...@google.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.
pr...@google.com <pr...@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 📈
Description
Component used: TV
Version used: 1.0.0-alpha03
Devices/Android versions reproduced on: Emulator (Android TV 4K API 33)
This is pretty simple to reproduce. For items within an immersive list, the
focusableItem
modifier should be applied to each list item in which the background should change. IffocusableItem
is used withclickable
clickable no longer works.I think passing an
InteractionSource
tofocusableItem
which is also shared withclickable
will resolve the issue.