hey guys, i’m getting this weird crash on the iOS ...
# multiplatform
h
hey guys, i’m getting this weird crash on the iOS side, but it totally works fine jvm and Android, more info in thread
Copy code
Can't show file for stack frame : <DBGLLDBStackFrame: 0x37481c010> - stackNumber:1 - name:kfun:kotlin.String#<get-length>(){}<http://kotlin.Int|kotlin.Int>. The file path does not exist on the file system: /opt/buildAgent/work/45667ea690d4c371/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/String.ktCan't show file for stack frame : <DBGLLDBStackFrame: 0x37481c010> - stackNumber:1 - name:kfun:kotlin.String#<get-length>(){}<http://kotlin.Int|kotlin.Int>. The file path does not exist on the file system: /opt/buildAgent/work/45667ea690d4c371/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/String.ktCan't show file for stack frame : <DBGLLDBStackFrame: 0x37481c010> - stackNumber:1 - name:kfun:kotlin.String#<get-length>(){}<http://kotlin.Int|kotlin.Int>. The file path does not exist on the file system: /opt/buildAgent/work/45667ea690d4c371/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/String.kt
Type: LLDB
Copy code
@Serializable
data object MultiListChooserGraph {
    @Serializable
    data class MultiListChooserDialog(
        val hideBottomNav: Boolean = true,
        val options: List<String>,
        val selectedPositions: List<Int> = emptyList(),
        val title: String,
        val confirmText: String,
        val dismissText: String,
        val requestKey: String? = null
    ) {
        @Serializable
        data class Result(val selectedPositions: List<Int>, val requestKey: String? = null)
    }
}
Copy code
MultiListChooserGraph.MultiListChooserDialog(
    hideBottomNav = false,
    options = apiResolutionOptions(),
    title = getString(Res.string.resolutions_title),
    dismissText = getString(Res.string.dismiss),
    confirmText = getString(Res.string.submit),
    selectedPositions = emptyList())
the function
apiResolutionOptions
returns a list of Strings
Copy code
<string name="resolution_3840x1600">3840x1600 (Ultra wide)</string>
<string name="resolution_3440x1440">3440x1440 (Ultra wide)</string>
<string name="resolution_2560x1080">2560x1080 (Ultra wide)</string>
<string name="resolution_3840x2400">3840x2400 (16:10)</string>
<string name="resolution_2560x1600">2560x1600 (16:10)</string>
<string name="resolution_1920x1200">1920x1200 (16:10)</string>
<string name="resolution_1600x1000">1600x1000 (16:10)</string>
<string name="resolution_1280x800">1280x800 (16:10)</string>
<string name="resolution_3840x2160">3840x2160 (16:9)</string>
<string name="resolution_2560x1440">2560x1440 (16:9)</string>
<string name="resolution_1920x1080">1920x1080 (16:9)</string>
<string name="resolution_1600x900">1600x900 (16:9)</string>
<string name="resolution_1280x720">1280x720 (16:9)</string>
<string name="resolution_3840x2880">3840x2880 (4:3)</string>
<string name="resolution_2560x1920">2560x1920 (4:3)</string>
<string name="resolution_1920x1440">1920x1440 (4:3)</string>
<string name="resolution_1600x1200">1600x1200 (4:3)</string>
<string name="resolution_1280x960">1280x960 (4:3)</string>
<string name="resolution_3840x3072">3840x3072 (5:4)</string>
<string name="resolution_2560x2048">2560x2048 (5:4)</string>
<string name="resolution_1920x1536">1920x1536 (5:4)</string>
<string name="resolution_1600x1280">1600x1280 (5:4)</string>
<string name="resolution_1280x1024">1280x1024 (5:4)</string>
m
are you using xcframework on iOS side ?
h
Yes
m
And you are using compose resources as I can see ?
h
It might be due to this being a navhost too, yes also resources
m
compose resources doesn't get packed with the xcframework
that's why the ios code isn't finding them
h
But other destinations that use the resources work, just this one doesn't
m
oh I had a similar problem because of resources then I moved to using #CMC5LN42W
h
So I thought maybe string malformed or some characters not supported
m
which solved the resources issue
is your code in a public repository ?
h
Nope
h
I think it might be one of the problems: • Kotlinx serialization as NavHost uses that in the background and I'm passing a list of String • The list has an invalid Swift/ObjC character • NavHost parsing issue
j
hi @Hristijan Did you happen to figure this out?
h
@Jimmy Jose no and I didn't have time to report the bug, it's probably due to the length of the string on iOS
617 Views