Hi,
I am trying to preload a directory of data file which is about 24 MB. But I
ran into an Assertion failed: you need to wait for the runtime to be ready
(e.g. wait for main() to be called);
This is the C++ code, when loaded, it alerts the message.
#include <stdio.h>
#include <emscripten.h>
int main() {
EM_ASM(alert("done!"));
return 0;
}
The Error output in Javascript console is:
Uncaught abort("Assertion failed: you need to wait for the runtime to be
ready (e.g. wait for main() to be called)") at Error
at jsStackTrace (http://localhost/smartbody/BoostFilesystem.js:2198:13)
at stackTrace (http://localhost/smartbody/BoostFilesystem.js:2215:22)
at abort (http://localhost/smartbody/BoostFilesystem.js:70341:44)
at assert (http://localhost/smartbody/BoostFilesystem.js:1410:32)
at asm._emscripten_replace_memory
(http://localhost/smartbody/BoostFilesystem.js:68453:8)
at enlargeMemory (http://localhost/smartbody/BoostFilesystem.js:2279:44)
at Function.Runtime.dynamicAlloc
(http://localhost/smartbody/BoostFilesystem.js:1373:202)
at _sbrk (http://localhost/smartbody/BoostFilesystem.js:8121:28)
at Object._malloc
(http://localhost/smartbody/BoostFilesystem.js:57241:16)
at processPackageData
(http://localhost/smartbody/BoostFilesystem.js:580:34)
I am still confused how to tell the loading process is done.
Thanks!
--
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.