touchlab / CrashKiOS

Crash reporting for Kotlin/Native iOS applications
https://crashkios.touchlab.co/
Apache License 2.0
258 stars 15 forks source link

InvalidMutabilityException when using new memory model #26

Closed scottobot closed 1 year ago

scottobot commented 2 years ago

I've updated to 0.6.0 and am still getting this exception when I migrate to the new memory model.

Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen co.touchlab.crashkios.LogCrashHandler@43d270 at 0 kmmsharedmodule 0x00000001126ae71b kfun:kotlin.Exception#(kotlin.String?){} + 11 at 1 kmmsharedmodule 0x00000001126cbbb2 ThrowInvalidMutabilityException + 1010 at 2 kmmsharedmodule 0x00000001126ca125 kfun:kotlin.native.concurrent.AtomicReference#(1:0){} + 85 at 3 kmmsharedmodule 0x000000011298c287 kfun:co.touchlab.crashkios.DefaultCrashHandler#(){} + 759 at 4 kmmsharedmodule 0x0000000112d8093e objc2kotlin.6474 + 862 at 5 iosApp 0x000000010bda4c3e $s6iosApp15KMMCrashHandlerC5startyyFZ + 78

russhwolf commented 1 year ago

Is this still an issue? I'm pretty sure that you shouldn't see this error if you're using the new memory model and you either: a. Add the flag kotlin.native.binary.freezing=disabled to gradle properties or b. Use Kotlin 1.6.20 or above

samhill303 commented 1 year ago

Closing, let us know if you're still having issues