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

Mike

05/12/2021, 12:09 PM
Was the KN memory model changed again in 1.5? I’m getting a lot of freeze errors on iOS after updating. Spent all afternoon debugging it.
t

Thomas

05/12/2021, 12:17 PM
Maybe you are running into this issue? https://github.com/Kotlin/kotlinx.coroutines/issues/2688
m

Mike

05/12/2021, 12:19 PM
I’m using reaktive (rx library) in my multiplatform project and not coroutines, I’ll check if it might be related
a

Arkadii Ivanov

05/12/2021, 10:08 PM
The memory is not changing, but it may start freezing things in some new conditions (possibly due to bug fixes etc.). There are two ways to deal with freezing: either make the related code freezable (atomics, etc.), or prevent the freezing. To find the freezer you can use
ensureNeverFrozen
on the object being frozen. It will produce a readable stack trace pointing to the freezing site.
m

Mike

05/12/2021, 11:53 PM
I’m planning to pare down the issue when I find some time. It seems to affect most of my network calls. The GitHub coroutines thread around timeout is somewhere I might start first, since I use timeout operator in my network calls that’s throwing the immutable error (though I’m not using coroutines)
a

Arkadii Ivanov

05/13/2021, 7:53 AM
If you are talking about Reaktive
timeout
operators, then it should not be related to the pinned issue. Try adding ensureNeverFrozen to the object being frozen, you will find the cause.
m

Mike

05/21/2021, 3:39 AM
Btw, it looks like the issue I saw was due to a kotlin serialization bug: https://github.com/Kotlin/kotlinx.serialization/issues/1450
a

Arkadii Ivanov

05/21/2021, 7:00 AM
Thabks for letting me know!