Hello, I’m running into an “out of memory” error when lauching the index.html file. Here’s what the Firefox Web Console got :
Invoking error handler due to
Uncaught abort(“Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 268435456, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.”) at Error
at jsStackTrace (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:1:22814)
at stackTrace (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:1:22997)
at abort (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:33:50745)
at enlargeMemory (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:1:23347)
at Function.dynamicAlloc [as alloc] (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:1:8283)
at _sbrk (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:1:325501)
at ecm (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:26:127113)
at heb (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:19:1098792)
at Leb (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:15:9369)
at Array.veb (blob:http%3A//zbim.fr/5dd8e422-57bd-48f3-b2da-8c4bfbdee1d1:19:1103615)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
I have already watched several topics, yet none of them really helped me to fix this problem
What is the best way to optimize memory on build ? (is there even a best way ?)
I’ve already planned to use “Fastest” optimization mode, don’t build in Development, turn on stripping and turn off exceptions, as acknowledged in Unity’s documentation.
I’ve tried many builds, some of them DO work at first, yet after a few minutes the WebGL stop working due to a lack of memory…