Open goldwaving opened 3 years ago
There appears to be many __sig items missing in emval.js, such as:
__emval_run_destructors.sig = "vi";
__emval_set_property.sig = "viii";
__emval_get_property.sig = "iii";
Adding these solves the problem.
Would you mind uploading PR to add these?
I have a project that compiles and runs fine. I am now working on adding dynamic link. When I add "-s MAIN_MODULE=1" and rebuild, I get runtime errors even before attempting to load any modules. The errors occurs before main() executes and seem to be relate to pthreads. The greater the PTHREAD_POOL_SIZE value, the greater the number of errors reported. There are no dynamic libraries to preload and no modules are being loaded yet. The code is exactly the same as before. The only change was adding "-s MAIN_MODULE=1".
project.worker.js:1 Uncaught TypeError: Cannot read property 'slice' of undefined at convertJsFunctionToWasm (project.js:1) at addFunctionWasm (project.js:1) at reportUndefinedSymbols (project.js:1) at preloadDylibs (project.js:1) at run (project.js:1) at project.js:1 at self.onmessage
and
project.worker.js:181 RuntimeError: abort(Assertion failed: Missing signature argument to addFunction: function emval_run_destructors(handle) { var destructors = emval_handle_array[handle].value; runDestructors(destructors); emval_decref(handle); }) at Error at jsStackTrace (project.js:2911) at stackTrace (project.js:3366) at abort (project.js:2171) at assert (project.js:1585) at addFunctionWasm (project.js:1442) at reportUndefinedSymbols (project.js:3319) at preloadDylibs (project.js:3333) at run (project.js:111096) at project.js:111216 at self.onmessage (project.worker.js:68) at abort (project.js:2173) at assert (project.js:1585) at addFunctionWasm (project.js:1442) at reportUndefinedSymbols (project.js:3319) at preloadDylibs (project.js:3333) at run (project.js:111096) at project.js:111216 at self.onmessage (project.worker.js:68)