HTML5 - Uncaught abort("Cannot enlarge memory arrays


Is there any solution to this issue?
Out of all the features of Unreal, HTML5 is the one which is never dependable. It keeps giving one or the other error.

Uncaught abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 536870912, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ") at Error

have you changed the heap size for html5 in project settings?
how big is the project you are trying to open? you might be exhausting the memory reserved for webgl.


I did try by increasing the heap size. Still facing the same issue.

My packaged project size (for Desktop) is approx 635 MB.

What is the optimum size of the project for working with webgl and HTML5?

Is there any separate workflow for creating projects for HTML5?

635 mb for a web project is too much, you are trying to put all of it into memory, then more for rendering on canvas. it will most definitely crash with a memory error.

try decreasing your texture sizes for html5 export (window > developer tools > device profiles, edit html5 texture sizes for global).
if you have audio, decrease the quality.
also, replace your high quality meshes with low resolutions ones. event hq lod’s will be a problem here.
try to find a way to use proxy objects, download assets when needed. this will drop the file size needed for the initialization of your javascript export.

What is the desirable project weight to web deployment?