https://kotlinlang.org logo
#korge
Title
# korge
a

Alexey Chuprin

09/19/2021, 7:53 PM
Hello! I am trying to study in the HelloWorld project (https://github.com/korlibs/korge-hello-world). And when run task
runIosSimulatorDebug
get error
Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread
. What am I doing wrong?
Copy code
> Task :runIosSimulatorDebug
Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread
    at 0   GameMain                            0x0000000101b21611 kfun:kotlin.Throwable#<init>(kotlin.String?){} + 97 (/opt/buildAgent/work/c5a36d4d82b914cf/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Throwable.kt:24:56)
    at 1   GameMain                            0x0000000101b1a81d kfun:kotlin.Exception#<init>(kotlin.String?){} + 93 (/opt/buildAgent/work/c5a36d4d82b914cf/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:58)
    at 2   GameMain                            0x0000000101b1aa3d kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 93 (/opt/buildAgent/work/c5a36d4d82b914cf/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:34:58)
    at 3   GameMain                            0x0000000101b5483d kfun:kotlin.native.IncorrectDereferenceException#<init>(kotlin.String){} + 93 (/opt/buildAgent/work/c5a36d4d82b914cf/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt:31:50)
    at 4   GameMain                            0x0000000101b7afb3 ThrowIncorrectDereferenceException + 131 (/opt/buildAgent/work/c5a36d4d82b914cf/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/RuntimeUtils.kt:104:11)
    at 5   GameMain                            0x0000000101d3a7ce CheckGlobalsAccessible + 30
    at 6   GameMain                            0x00000001021ff625 kfun:com.soywiz.korim.font.<get-iosFontsFolders>#internal + 21 (/Users/runner/work/korge-next/korge-next/korim/src/iosWatchosTvosCommonMain/kotlin/com/soywiz/korim/font/NativeSystemFontProviderFallback.kt:5:93)
    at 7   GameMain                            0x000000010220a7e8 kfun:kotlin.native.caches.abi#$com.soywiz.korim.font.BitmapFont.Kerning.Companion.globalAccessor(){}com.soywiz.korim.font.BitmapFont.Kerning.Companion + 28600
    at 8   GameMain                            0x0000000101d4c636 Kotlin_initRuntimeIfNeeded + 1462
    at 9   GameMain                            0x0000000101d52118 _ZN12_GLOBAL__N_113workerRoutineEPv + 40
    at 10  libsystem_pthread.dylib             0x00007fff603438fc _pthread_start + 224
    at 11  libsystem_pthread.dylib             0x00007fff6033f443 thread_start + 15
com.example.example.app-X64-Debug: 61527

> Task :runIosSimulatorDebug FAILED
d

Deactivated User

09/19/2021, 9:25 PM
Oh fu. That looks like a regression
Maybe you can change the version to 2.3.x something in the meantime
a

Alexey Chuprin

09/20/2021, 5:24 AM
The same thing happens in version 2.3.4
d

Deactivated User

09/30/2021, 8:46 AM
@Alexey Chuprin I fixed that in the latest version. Can you try again? https://github.com/korlibs/korge-next/releases/tag/v2.4.3
👏 1
a

Alexey Chuprin

09/30/2021, 9:32 AM
@Deactivated User It works! Thanks, you're super!
👏 1
7 Views