HTML5 Mobile Browsers Out of Memory (UE 4.10.4)
I'm producing HTML5 output from UE 4.10.4 (has to be this version, as I've been unsuccessful in producing functional output in later versions – this appears to be due to emscripten issues). This works without issue when accessing the content (served from the web) via desktop browser. If, however, it's accessed from Chrome or Safari on iOS, i get "Error: Out of memory".
If accessed from Chrome on Android, I get "Uncaught RangeError: Array buffer allocation failed".
Heap size has been tried at 1024, 2048, & 4096, with the same results.
One thing to note is that this is NOT the "uncaught exception: out of memory" error described in some of the other threads:
asked Apr 01 '17 at 07:43 PM in Packaging & Deployment
The out of memory error is actually coming from the heap allocation itself, so making the heap size larger makes it run even more out of memory and not the other way around. Try reducing the heap size to e.g. 256MB or 384MB for mobile. Also try out Firefox or Chrome browsers on mobile, those are the only browsers that at the moment ship WebAssembly support. UE 4.16 is planned to have WebAssembly as well. I believe current UE4 Github master branch has WebAssembly as well.
There is probably no way to get UE4 size codebases to work on current Safari on iOS with the current pre-WebAssembly asm.js, unless perhaps if running tiny projects, since the mobile Safari browser has not been optimized for asm.js at all. Once WebAssembly lands to Safari on iOS, success rates should be dramatically better. Current nightly WebKit builds on desktop already have WebAssembly support, so they are working on it, but unfortunately there is no release schedule yet. If you do want to try before that, check by using desktop Firefox and Chrome browsers to profile memory usage first, and see if you can squeeze the web page to under 300-400MB or so.
answered Apr 10 '17 at 12:34 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here