Hello, I have a CMP KMP app that crashes on iOS 15...
# multiplatform
g
Hello, I have a CMP KMP app that crashes on iOS 15 and 18, but it works fine on iOS 18.6, 18.5, and 26. In the stack trace, I see an EXC_BAD_ACCESS error, where it fails to get getInfoType. This points to the Kotlin hash function, then goes to mutableMap, then concurrentMap (Touchlab), and finally reaches the Koin module. We tested this with Kotlin 2.2.10 and 2.2.20, and also with Compose 1.8.2 and 1.9.0 — the issue still happens. My questions: 1. Haven’t the newer Kotlin versions updated the memory allocator? We also checked the iOS 18 changelog and saw memory allocator updates there — so why does this crash still occur? 2. Does this mean we should also expect crashes on iOS 16 and 17? In other words, does KMP only work reliably on the very latest iOS versions like 26? 😂 Not everyone has iOS 26.
👀 1
I found cuase of crash Sentry cocoa crashed 🤔
The issue is resolved 🎉 It wasn’t actually related to Sentry Cocoa or the iOS version. The real problem was that I was providing an Objective-C object directly through Koin. This caused interop issues between Kotlin/Native and the Objective-C runtime. The fix was to avoid injecting raw Objective-C objects into Koin and instead use a proper wrapper or manage them outside of Koin.