emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

Generic error if FS.createPreloadedFile parent doesn't exist

Open curiousdannii opened this issue 1 month ago • 0 comments

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.59 (0e4c5994eb5b8defd38367a416d0703fd506ad81)
clang version 19.0.0git (https:/github.com/llvm/llvm-project df762a1643bb5b0b3c907611d118c82d4b68a39d)

I'm trying to preload some files (in a pre-js file):

Module.preRun = () => {
    FS.createPreloadedFile('/data', 'journey-r83-s890706.z6', 'journey-r83-s890706.z6', true, false)
    FS.createPreloadedFile('/data', 'Journey.blb', 'Journey.blb', true, false)
}

Since I forgot to create the /data folder first I'm getting a console errors, but they're very generic and unhelpful. Enabling -sASSERTIONS doesn't make a difference.

sfrotz.js:3406 Uncaught <generic error, no stack>
sfrotz.html:195 [post-exception status] Exception thrown, see JavaScript console
sfrotz.js:3406 Uncaught <generic error, no stack>

curiousdannii avatar May 12 '24 00:05 curiousdannii