Hello everyone,
I am having problem to load 2 WebAssembly modules. I need both, because one
is the opencv.js script
(https://docs.opencv.org/3.4/d4/da1/tutorial_js_setup.html) and the other
is my code with the necessary C++ functions binded with Embind, where I am
going to process the video frames from camera.
When loading 2 modules I am getting following error in the console:
uncaught exception: abort("Assertion failed: provided buffer should be <x>
bytes, but it is <y>") at jsStackTrace@http....
I am loading the both in the following way:
<script src="opencv.js" type="text/javascript"></script>
<script src="Camera_processing_wasm.js" type="text/javascript"></script>
The second one ("Camera_processing_wasm.js") starts with the following line:
var Module = typeof Module !== 'undefined' ? Module : {};
So it should be added to the previous module, without remove it.
The assertion fails in this line:
assert(buffer.byteLength === TOTAL_MEMORY, 'provided buffer should be ' +
TOTAL_MEMORY + ' bytes, but it is ' + buffer.byteLength);
And that is correct, the TOTAL_MEMORY set by "opencv.js" is different, than
the TOTAL_MEMORY from "Camera_processing_wasm.js", but what defines it?
I made sure, that the both are compiled with the same emscripten version,
with same flags, but the problem persists.
Could you please tell me if loading multiple WebAssembly modules is
possible? And if so, where can the buffer size be defined, when compiling
with emscripten?
Thank you very much!
Best regards,
Jendker
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.