Comments (5)
but instead with whichever version @DmitriySalnikov used for the 1.4.2 release
And I finally found what the problem was!
I even managed to launch the project in Firefox. (thanks to the emscripten update?)
LinkError: WebAssembly.instantiate(): Import #62 "env" "memory": mismatch in shared state of memory, declared = 1, imported = 0
The mismatch between shared and non-shared memory directly depends on threads support.
I can reproduce the issue with the MRP on Firefox with 4.3.beta3, with these errors:
Uncaught (in promise) LinkError: imported function 'env._ZNSt3__26chrono12steady_clock3nowEv' signature mismatch still waiting on run dependencies: [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
Yes, for some reason it is not possible to use std::chrono
in my module and I had to switch to using Time::
. I have not been able to solve this problem yet.
It seems that the standard libraries are not included in the SIDE_MODULE
.
Here you can download .gdextension_libs with new libraries. And here Is an updated .gdextension.
These libraries should still be supported starting with godot 4.2.
from godot.
Which Emscripten version did you use to compile the GDExtension?
from godot.
Which Emscripten version did you use to compile the GDExtension?您使用哪个 Emscripten 版本来编译 GDExtension?
I use 3.1.62.
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.62-git
clang version 19.0.0git
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/emscripten/3.1.62/libexec/llvm/bin
from godot.
I can reproduce the issue with the MRP on Firefox with 4.3.beta3, with these errors:
Uncaught (in promise) LinkError: imported function 'env._ZNSt3__26chrono12steady_clock3nowEv' signature mismatch
still waiting on run dependencies: [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
dependency: loadDylibs [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
(end of list) [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
still waiting on run dependencies: [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
dependency: loadDylibs [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
(end of list) [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
still waiting on run dependencies: [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
dependency: loadDylibs [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
(end of list) [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
still waiting on run dependencies: [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
dependency: loadDylibs [tmp_js_export.js:46811:18](http://localhost:8060/tmp_js_export.js)
(end of list)
Worth noting that the addons includes prebuilt binaries in the git repo. If you're using those instead of compiling your own, then they might not have been compiled with Emscripten 3.1.62, but instead with whichever version @DmitriySalnikov used for the 1.4.2 release. I tested updating to 1.4.3 and it still has the same issue.
One should test with a custom built extension using Emscripten 3.1.62 (like 4.3.beta3) or 3.1.63 (regression fix release, which we'll use for 4.3.rc1).
from godot.
Thanks to @DmitriySalnikov. On 4.3.beta3, I'm able to fixed this issue by building gdextensions using threads=no|yes
and edit the .gdextension file like below:
...
web.wasm32.nothreads = "res://addons/xxx/bin/libxxx.web.template_debug.wasm32.nothreads.wasm"
web.wasm32 = "res://addons/xr/bin/libxxx.web.template_debug.wasm32.wasm"
...
Maybe we should add this sections to the gdextension tutorial?
from godot.
Related Issues (20)
- [Android Editor] Import button does not show folder content until Create button is pressed
- OpenGL: Mesh/Material resource preview thumbnails no longer render
- Problem assigning 2D bones.
- Draggging/moving the game window exhibits choppiness/stuttering HOT 3
- "Always closes output on exit" option not work HOT 1
- GD.RandRange is broken at integer limits, always returning the same number. HOT 4
- Collapse bottom panel issue HOT 1
- Exported game has issues with loading resources in @export variables HOT 4
- Array with inner class type(`Array[InnerClass]`) breaks debug with `failed to encode a path` HOT 3
- Fetching a texture in _draw() results in it being all white when attempting to draw it HOT 1
- Godot does not detect rear analog triggers on the stadia controller.
- Editor freezes when reimporting glb if mesh has a shader material that contains an #include
- `Godot.NET.Sdk`'s `GD0107` does not apply to exported members of type `Node[]`
- Resolving and caching issues of the GDScript editor when moving GDScript files
- Every other word blurry in checkbutton with linear texture / pixel font HOT 2
- Generated .gitignore excludes all android folders recursively
- Can not run fullscreen mode on WSLg X11
- VRS mode XR causes extreme aliasing on linux compared to windows
- Multiple Run Instances takes a long time to start
- Animation does not play after set input name of Transition in AnimationTree
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.