https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

stanislav

03/19/2019, 2:30 PM
Hi, I'm getting crash @ iOS @ Kotlin_Array_get
Original Kotlin code:
Copy code
enum class HTTPMethod {
    get, post, patch, put, delete
}
s

svyatoslav.scherbina

03/19/2019, 2:34 PM
It is null pointer dereference. May happen due to unexpected initialization order. Could you share the stacktrace?
s

stanislav

03/19/2019, 2:34 PM
Example usage:
Copy code
Session.shared.api.request(method: .get,
                                   path: getRequestPath(for: room),
                                   params: params,
                                   useCacheAsFastResponse: false)
@svyatoslav.scherbina Yeah, I've shared stack trace already
s

svyatoslav.scherbina

03/19/2019, 2:36 PM
As far as I can see, you’ve shared the disassembly, not the stacktrace.
s

stanislav

03/19/2019, 2:38 PM
Yeah, sorry. 1 second.
s

svyatoslav.scherbina

03/19/2019, 2:43 PM
You probably encounter initialization order issues in ktor.
s

stanislav

03/19/2019, 2:44 PM
How can I influence initialization order?
s

svyatoslav.scherbina

03/19/2019, 2:46 PM
I doubt you can. Please report this issue to #ktor.
s

stanislav

03/19/2019, 2:49 PM
Thanks a lot. Reported, got an answer ❤️
👍 1
In fact I could, I just had to remove initialization from Global
👍 1
2 Views