emscripten-core / emscripten-core/emscripten
worker.js onmessage() captured an uncaught exception : runtimeError :invalid index into function table
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
i use the `emscripten_set_main_loop_arg` in pthread worker , and run the .wasm multiple times , there is an error :
`worker.js onmessage() captured an uncaught exception : runtimeError :invalid index into function table
RuntimeError: invalid index into function table at :wasm-function[200]:0x1adef8
at Object.invokeEntryPoint
at self.onmessage `
i say the same problem in https://github.com/emscripten-core/emscripten/issues/11715 , in the issue , he said ` I guess the solution is to change this code to actually stash the closure and keep it alive in a thread_local storage until emscripten_cancel_main_loop is called` , so how to keep it alive ?
Contributor guide
Assessment
This issue has not been assessed yet.