iOS crash on init ktor -> charsets->cinterop at launch
Peter Hsu
06/03/2022, 10:39 PM
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 ()
Peter Hsu
06/03/2022, 10:41 PM
does anyone has anyone seen this before? it is happening sporadically... not sure where to begin looking
Peter Hsu
08/10/2022, 9:28 PM
are you using Koin by any chance?
r
Raymond Chan
08/10/2022, 9:34 PM
Yes we are. Is it related? 😮
p
Peter Hsu
08/12/2022, 4:21 AM
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