Mike Digman
04/17/2023, 10:36 PMcaught RuntimeError: remainder by zero at skiko.wasm:0x28a295
? From what I can tell, there may be a low-level math bug somewhere related to shadow rendering?Mike Digman
04/17/2023, 10:41 PM.shadow(elevation = 2.dp, shape = RoundedCornerShape(topStart = 28.dp, topEnd = 28.dp))
Different elevation values don't trigger the crash. However, different shape values do. For example, this runs without an issue:
.shadow(elevation = 2.dp, shape = RoundedCornerShape(8.dp))
Dima Avdeev
04/18/2023, 6:58 AMDima Avdeev
04/18/2023, 6:58 AMOleksandr Karpovich [JB]
04/18/2023, 9:23 AMMike Digman
04/18/2023, 4:14 PMMike Digman
04/19/2023, 6:51 PM@Composable
fun AsymmetricScaleTester() {
Box(
Modifier.size(100.dp)
.graphicsLayer(scaleX = 0.7f, scaleY = 1f)
.shadow(elevation = 2.dp)
)
}
The error is a divide by zero (vs the prior remainder by zero):
skiko.wasm:0x28ab10 Uncaught RuntimeError: divide by zero
at skiko.wasm:0x28ab10
Mike Digman
04/19/2023, 7:01 PMChris Sinco [G]
06/28/2023, 4:11 PMModifier.rotate
. But I have a feeling it’s not that. Is there a way to isolate what is causing Skiko crashes? Try/catches and println debugging doesn’t seem to be working initially.Oleksandr Karpovich [JB]
06/28/2023, 4:15 PMChris Sinco [G]
06/28/2023, 6:21 PMrotate
so trying to see how I can debug it properly to helpChris Sinco [G]
06/28/2023, 6:22 PMChris Sinco [G]
06/28/2023, 8:37 PMrotate
and shadow
- here’s the Composable that repros a divide by zero
exception
@Composable
fun SimpleView() {
Box(
modifier = Modifier
.size(width = 360.dp, height = 360.dp)
.rotate(-60.0f)
.padding(42.dp)
.shadow(elevation = 16.dp, shape = RoundedCornerShape(size = 32.dp))
.background(color = Color.Yellow, shape = RoundedCornerShape(size = 32.dp))
) { }
}
Oleksandr Karpovich [JB]
06/29/2023, 8:10 AM