I’m getting this error: `Uncaught Kotlin exception...
# multiplatform
c
I’m getting this error:
Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen com.jetbrains.handson.mpp.mobile.services.deviceStorage.DeviceStorage@2164548
Even though my DeviceStorage has
Copy code
import kotlin.native.concurrent.ThreadLocal

@ThreadLocal
object DeviceStorage {
...
}
Anyone knows how to get this to work?
k
What’s inside
DeviceStorage
? It’s also possible something else is freezing
DeviceStorage
, even if the runtime isn’t doing so automatically (call
ensureNeverFrozen()
on it)
1