https://kotlinlang.org logo
#compose
Title
# compose
t

theapache64

05/09/2022, 10:26 AM
I got this crash in my crashlytics today and it doesn’t have the triggering point (where it triggered from).
Copy code
Fatal Exception: java.lang.IllegalArgumentException
Cannot round NaN value.
kotlin.math.MathKt__MathJVMKt.roundToInt (MathKt__MathJVMKt.java:1132)
androidx.compose.animation.core.VectorConvertersKt$IntOffsetToVector$2.invoke-Bjo55l4 (VectorConverters.kt:172)
It looks like its thrown from the animation framework . Full stacktrace in 🧵
Copy code
Fatal Exception: java.lang.IllegalArgumentException
Cannot round NaN value.
kotlin.math.MathKt__MathJVMKt.roundToInt (MathKt__MathJVMKt.java:1132)
androidx.compose.animation.core.VectorConvertersKt$IntOffsetToVector$2.invoke-Bjo55l4 (VectorConverters.kt:172)
androidx.compose.animation.core.VectorConvertersKt$IntOffsetToVector$2.invoke (VectorConverters.kt:170)
androidx.compose.animation.core.TargetBasedAnimation.getValueFromNanos (Animation.kt:233)
androidx.compose.animation.core.Transition$TransitionAnimationState.onPlayTimeChanged$animation_core_release (Transition.java:508)
androidx.compose.animation.core.Transition.onFrame$animation_core_release (Transition.kt:295)
androidx.compose.animation.core.Transition.onFrame$animation_core_release (Transition.kt:304)
androidx.compose.animation.core.Transition$animateTo$1$1$1.invoke (Transition.kt:437)
androidx.compose.animation.core.Transition$animateTo$1$1$1.invoke (Transition.kt:432)
androidx.compose.runtime.BroadcastFrameClock$FrameAwaiter.resume (BroadcastFrameClock.java:42)
androidx.compose.runtime.BroadcastFrameClock.sendFrame (BroadcastFrameClock.kt:71)
androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke (Recomposer.kt:461)
androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke (Recomposer.kt:454)
androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame (AndroidUiFrameClock.android.kt:34)
androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch (AndroidUiDispatcher.java:109)
androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch (AndroidUiDispatcher.java:41)
androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame (AndroidUiDispatcher.android.kt:69)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1350)
android.view.Choreographer.doCallbacks (Choreographer.java:1149)
android.view.Choreographer.doFrame (Choreographer.java:1040)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1333)
android.os.Handler.handleCallback (Handler.java:938)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:233)
android.app.ActivityThread.main (ActivityThread.java:8063)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:631)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:978)
t

Tash

05/09/2022, 10:28 PM
Saw couple other issues around this NaN thing https://issuetracker.google.com/issues/215386234 https://issuetracker.google.com/issues/219980303 maybe worth filing as bug?
t

theapache64

05/10/2022, 4:38 AM
@Tash Thanks for the links. Those two issues have the same stacktrace header but looks triggered from different area (or different scenario), but yeah, worth filing a bug i guess. UPDATE: Created : https://issuetracker.google.com/issues/232030217
👍🏼 1
@Doris Liu Any idea about this one ?
d

Doris Liu

05/10/2022, 6:55 PM
These NaN issues are likely related. @theapache64 Since when did you start seeing these crashes?
t

theapache64

05/11/2022, 1:52 AM
@Doris Liu We’re using compose
1.1.1
. I am not allowed to use non stable versions. Otherwise I would have tried the latest alpha.
338 Views