Git Product home page Git Product logo

gofile.kt's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/checkout v4
  • actions/setup-java v4
  • peaceiris/actions-gh-pages v4
.github/workflows/deploy.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/checkout v4
  • actions/setup-java v4
  • actions/checkout v4
  • actions/setup-java v4
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
gradle/libs.versions.toml
  • org.jetbrains.kotlin:kotlin-test 1.9.24
  • io.ktor:ktor-client-core 2.3.11
  • io.ktor:ktor-client-content-negotiation 2.3.11
  • io.ktor:ktor-serialization-kotlinx-json 2.3.11
  • io.ktor:ktor-client-mock 2.3.11
  • io.ktor:ktor-client-cio 2.3.11
  • io.ktor:ktor-client-winhttp 2.3.11
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.8.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.8.1
  • com.squareup.okio:okio 3.9.0
  • org.jetbrains.dokka:versioning-plugin 1.9.20
  • org.jetbrains.kotlin.multiplatform 1.9.24
  • org.jetbrains.kotlin.plugin.serialization 1.9.24
  • org.jmailen.kotlinter 4.3.0
  • org.jetbrains.kotlinx.kover 0.8.1
  • org.jetbrains.dokka 1.9.20
  • com.github.johnrengelman.shadow 8.1.1
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.8

  • Check this box to trigger a request for Renovate to run again on this repository

example/native: kotlin.native.IncorrectDereferenceException: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread

Source

examples/native/src/nativeMain/kotlin/dev/s7a/example/gofile/Main.kt

Error

epq@epq native % ./build/bin/native/releaseExecutable/gofile-example-native.kexe
Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread
    at 0   gofile-example-native.kexe          0x10169d76c        ThrowIncorrectDereferenceException + 92 
    at 1   gofile-example-native.kexe          0x10174ce16        kfun:io.ktor.util.ThreadInfo#<init>(){} + 230 
    at 2   gofile-example-native.kexe          0x101842cc1        InitSingleton + 465 
    at 3   gofile-example-native.kexe          0x10174b9c1        kfun:io.ktor.util.MultiWorkerDispatcher.$<bridge-UNNN><init>$lambda-1#static(kotlin.Unit){}#internal + 113 
    at 4   gofile-example-native.kexe          0x101856318        _ZN6Worker19processQueueElementEb + 664 
    at 5   gofile-example-native.kexe          0x10185606c        _ZN12_GLOBAL__N_113workerRoutineEPv + 44 
    at 6   libsystem_pthread.dylib             0x7ff811aba4e0     _pthread_start + 124 
    at 7   libsystem_pthread.dylib             0x7ff811ab5f6a     thread_start + 14 
Uncaught Kotlin exception: kotlin.IllegalStateException
    at 0   gofile-example-native.kexe          0x10169d6d7        ThrowIllegalStateException + 87 
    at 1   gofile-example-native.kexe          0x10185815a        Kotlin_Worker_consumeFuture + 1034 
    at 2   gofile-example-native.kexe          0x10174cb29        kfun:io.ktor.util.consume#internal + 105 
    at 3   gofile-example-native.kexe          0x10174b5d5        kfun:io.ktor.util.MultiWorkerDispatcher.<init>#internal + 1333 
    at 4   gofile-example-native.kexe          0x10180313f        kfun:io.ktor.client.engine.cio.CIOEngine.$<init>$lambda-0$FUNCTION_REFERENCE$3.invoke#internal + 239 
    at 5   gofile-example-native.kexe          0x101691f1c        kfun:kotlin.native.concurrent.FreezeAwareLazyImpl.getOrInit#internal + 524 
    at 6   gofile-example-native.kexe          0x1016921ab        kfun:kotlin.native.concurrent.FreezeAwareLazyImpl#<get-value>(){}1:0 + 123 
    at 7   gofile-example-native.kexe          0x1018031db        kfun:io.ktor.client.engine.cio.CIOEngine.$<init>$lambda-1$FUNCTION_REFERENCE$4.invoke#internal + 107 
    at 8   gofile-example-native.kexe          0x101691f1c        kfun:kotlin.native.concurrent.FreezeAwareLazyImpl.getOrInit#internal + 524 
    at 9   gofile-example-native.kexe          0x1016921ab        kfun:kotlin.native.concurrent.FreezeAwareLazyImpl#<get-value>(){}1:0 + 123 
    at 10  gofile-example-native.kexe          0x1018000dc        kfun:io.ktor.client.engine.cio.CIOEngine#<init>(io.ktor.client.engine.cio.CIOEngineConfig){} + 1692 
    at 11  gofile-example-native.kexe          0x1017ff9be        kfun:io.ktor.client.engine.cio.CIO#create(kotlin.Function1<io.ktor.client.engine.cio.CIOEngineConfig,kotlin.Unit>){}io.ktor.client.engine.HttpClientEngine + 1246 
    at 12  gofile-example-native.kexe          0x1017dbaf4        kfun:dev.s7a.gofile.GofileClient#<init>(){} + 708 
    at 13  gofile-example-native.kexe          0x1018220cd        kfun:dev.s7a.example.gofile#main(){} + 285 
    at 14  gofile-example-native.kexe          0x10184ceea        Init_and_run_start + 330 
    at 15  gofile-example-native.kexe          0x10184cf9d        Konan_main + 13 
    at 16  dyld                                0x10a29e51d        0x0 + 4465485085 
zsh: abort      ./build/bin/native/releaseExecutable/gofile-example-native.kexe

Re-add ignored Test

@Ignore // TODO native: ArrayIndexOutOfBoundsException will be thrown, why?
@Test
fun getContent_should_be_successful() {
runTest {
val mockEngine = MockEngine {
respond(
content = """
{
"status": "ok",
"data": {
"isOwner": true,
"id": "3dbc2f87-4c1e-4a81-badc-af004e61a5b4",
"type": "folder",
"name": "Z19n9a",
"parentFolder": "3241d27a-f7e1-4158-bc75-73d057eff5fa",
"code": "Z19n9a",
"createTime": 1648229689,
"public": true,
"childs": [],
"totalDownloadCount": 0,
"totalSize": 9840497,
"contents": {}
}
}
""".trimIndent().let(::ByteReadChannel),
status = HttpStatusCode.OK,
headers = headersOf(HttpHeaders.ContentType, "application/json")
)
}
assertNotNull(GofileClient(mockEngine).getContent("3dbc2f87-4c1e-4a81-badc-af004e61a5b4", "ivlW1ZSGn2Y4AoADbCHUjllj2cO9m3WM").getOrThrow())
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.