--preload-file not loading data

61 views
Skip to first unread message

Gareth Aye

unread,
May 3, 2016, 1:02:36 AM5/3/16
to emscripten-discuss
Hello!

First off, thank you all for your work on emscripten -- such an awesome and exciting tool!

The specific issue I'm writing about has to do with emcc's --preload-file option. My .data file gets created and I'm successfully running my generated code in a web worker, but the data that's supposed to be injected into MEMFS never winds up there. I can see the .data file gets fetched from the server, but when I try FS.readFile (after Module.main has been run), I get

Array [ ".", "..", "tmp", "home", "dev", "proc" ]

which doesn't include my application data. Are there size issues and/or limits at play here? My .data file is quite large (54M).

Anyway I'm having a lot of fun hacking around with the compiler. Great work!

-Gareth

Gareth Aye

unread,
May 3, 2016, 1:04:19 AM5/3/16
to emscripten-discuss
To add a bit more context, I'm running the js that emcc produces within a web worker (but not using https://kripken.github.io/emscripten-site/docs/api_reference/emscripten.h.html#worker-api).

Gareth Aye

unread,
May 3, 2016, 11:29:22 AM5/3/16
to emscripte...@googlegroups.com
Er when I mentioned FS.readFile, what I really meant was FS.readdir('/') gives Array [ ".", "..", "tmp", "home", "dev", "proc" ] notably lacking my preload data.

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/Mg6sFzmj_nw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alon Zakai

unread,
May 3, 2016, 2:24:25 PM5/3/16
to emscripten-discuss
There shouldn't be a size limit, but maybe a browser has a bug there. Does it work in other browsers? Perhaps something shows up in the web console? And worth checking with smaller files (up until the hello world example in the tutorial) to see where things start to break for you.

--
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 emscripten-disc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages