https://kotlinlang.org logo
#ios
Title
# ios
b

Brian Guertin

01/18/2022, 11:06 PM
Anyone know why
kotlin.collections.HashMap.get
would be causing
EXC_BAD_ACCESS
on iOS? It only happens sometimes
message has been deleted
d

darkmoon_uk

01/19/2022, 11:15 PM
@Brian G You may want to subscribe to this issue which proposes bringing streaming (de)serialization support to platforms other than JVM. Key characteristic of streamed handling being reduced peak memory load.
b

Brian Guertin

01/19/2022, 11:49 PM
Hmm, would that even help though? My data is not large, only a few kilobytes. I suspect it's more about the nesting or something. Even only 5 fields deep in the JSON, kotlinx.serialization's stack is like 700 calls deep.
The thing that has me scratching my head the most, is that when Ktor calls the json deserializer, it works fine, but If I call the same deserializer in my code, I get this error. Regardless of if I use main thread or worker thread.
4 Views