Open logutenko opened 2 months ago
When playing an animation inside bottom sheet, a large amount of memory is allocated. This causes an application to crash with OOM error.
Affected platforms
Versions
To Reproduce Steps to reproduce the behavior:
In the example graphics-2d replace Scaffold with ModalBottomSheet:
@OptIn(ExperimentalMaterial3Api::class) @Composable fun Graphics2D(requestWindowSize: ((width: Dp, height: Dp) -> Unit) = EMPTY_WINDOW_RESIZER) { val exampleState: MutableState<Example?> = remember { mutableStateOf(null) } val example = exampleState.value MaterialTheme( colorScheme = if (isSystemInDarkTheme()) darkColorScheme() else lightColorScheme() ) { ModalBottomSheet(onDismissRequest = {}) { if (example == null) { LazyColumn(Modifier.padding(horizontal = 16.dp)) { items(examples) { Button(onClick = { exampleState.value = it }) { Text(it.name) } } } } else { example.content { w, h -> requestWindowSize(w, h + TOP_APP_BAR_HEIGHT) } } } } }
According to the profiler, memory consumption is over 3 GiB
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
When playing an animation inside bottom sheet, a large amount of memory is allocated. This causes an application to crash with OOM error.
Affected platforms
Versions
To Reproduce Steps to reproduce the behavior:
In the example graphics-2d replace Scaffold with ModalBottomSheet:
According to the profiler, memory consumption is over 3 GiB