iOS crash on init ktor -> charsets->cinterop...
# kotlin-native
p
iOS crash on init ktor -> charsets->cinterop at launch
Copy code
#0	(null) in kfun:kotlinx.cinterop#<get-cstr>__at__kotlin.String(){}kotlinx.cinterop.CValues<kotlinx.cinterop.ByteVarOf<kotlin.Byte>> ()
#1	(null) in kfun:kotlinx.cinterop#<get-cstr>__at__kotlin.String(){}kotlinx.cinterop.CValues<kotlinx.cinterop.ByteVarOf<kotlin.Byte>> ()
#2	(null) in kfun:io.ktor.utils.io.charsets.CharsetImpl.<init>#internal ()
#3	(null) in kfun:io.ktor.utils.io.charsets.Charsets#<init>(){} ()
#4	(null) in InitSingletonStrict ()
#5	(null) in 0x106780000 ()
#6	(null) in Kotlin_initRuntimeIfNeeded ()
#7	(null) in (anonymous namespace)::workerRoutine(void*) ()
#8	(null) in _pthread_start ()
#9	(null) in thread_start ()
does anyone has anyone seen this before? it is happening sporadically... not sure where to begin looking
are you using Koin by any chance?
r
Yes we are. Is it related? 😮
p
Could be - for us, the exception was always on a non-main thread. However, the main thread was always at a method in swift object that was injected. So I suspect there was some underlying mutation issue causing this. We did away with that particular method as it wasn't critical and we haven't seen the exception in a while. We are still on kotlin 1.6/legacy memory management