https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
c

Christian Sousa

03/20/2020, 11:31 AM
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

kpgalligan

03/20/2020, 12:10 PM
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