Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM: RuntimeError: dereferencing a null pointer #1983

Open
phansier opened this issue Sep 16, 2024 · 0 comments
Open

WASM: RuntimeError: dereferencing a null pointer #1983

phansier opened this issue Sep 16, 2024 · 0 comments

Comments

@phansier
Copy link

phansier commented Sep 16, 2024

Describe the bug

Trying to use Koin in WASM target of Compose and Kotlin multiplatform project.
With manual dependecies providing - it works.
With Koin I get the RuntimeError: dereferencing a null pointer

Stacktrace:

dereferencing a null pointer
RuntimeError: dereferencing a null pointer
    at <Coffeegram:cmp-common>.org.koin.core.module.flatten (http://localhost:8080/composeApp.wasm:wasm-function[24099]:0x45ca7b)
    at <Coffeegram:cmp-common>.org.koin.core.Koin.loadModules (http://localhost:8080/composeApp.wasm:wasm-function[23906]:0x45a077)
    at <Coffeegram:cmp-common>.org.koin.core.KoinApplication.loadModules (http://localhost:8080/composeApp.wasm:wasm-function[23922]:0x45a425)
    at <Coffeegram:cmp-common>.org.koin.core.KoinApplication.modules (http://localhost:8080/composeApp.wasm:wasm-function[23919]:0x45a3ec)
    at <Coffeegram:cmp-common>.org.koin.core.KoinApplication.modules (http://localhost:8080/composeApp.wasm:wasm-function[23917]:0x45a298)
    at <Coffeegram:cmp-common>.initKoin$lambda.invoke (http://localhost:8080/composeApp.wasm:wasm-function[63037]:0x7e27f3)
    at <Coffeegram:cmp-common>.initKoin$lambda.invoke (http://localhost:8080/composeApp.wasm:wasm-function[63038]:0x7e281d)
    at <Coffeegram:cmp-common>.org.koin.core.context.GlobalContext.startKoin (http://localhost:8080/composeApp.wasm:wasm-function[24248]:0x45fff3)
    at <Coffeegram:cmp-common>.org.koin.core.context.startKoin (http://localhost:8080/composeApp.wasm:wasm-function[23934]:0x45a582)
    at <Coffeegram:cmp-common>.initKoin (http://localhost:8080/composeApp.wasm:wasm-function[62999]:0x7e1b4b)

To Reproduce

Steps to reproduce the behavior:

  1. Checkout https://github.com/phansier/Coffeegram/tree/koin-wasm
  2. Run make runWasm
  3. App launches in browser, stacktrace displayed.

Expected behavior
Dependencies tree resolved and app working
You can rollback one commit or uncomment changes here to see it working without Koin.

Koin module and version:
Tried 3.6.0-Beta2 and 4.0.0-RC2 and 4.0.0

Snippet or Sample project to help reproduce
https://github.com/phansier/Coffeegram/tree/koin-wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant