Build fails when Enabling exceptions

Hi guys,
I can make a webgl build if I disable exception. But when I switch them to Full I get this error:

Kudos!
PS: I’m building on a i7, 16gb, intel SSD with 65gb still free, OS: win7 x64. I don’t really understand I get process out of memory :expressionless:

Big error

Failed running “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe” “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc” @“G:/00 Work/00 Unity/16 HS2.0/Assets/…/Temp/emcc_arguments.resp”

stdout:
WARNING: sanity check failed to run [Errno 13] Permission denied: ‘C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/emscripten.config_sanity’
stderr:
WARNING root: did not see a source tree above the LLVM root directory (guessing based on directory of C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_FastComp_Win\llc), could not verify version numbers match
INFO root: (Emscripten: Running sanity checks)
WARNING root: java does not seem to exist, required for closure compiler, which is optional (define JAVA in ~/.emscripten if you want it)
warning: unresolved symbol: pthread_kill
warning: unresolved symbol: tcflush
warning: unresolved symbol: _ZN4FMOD13DSPConnection6setMixEf
warning: unresolved symbol: pthread_create
FATAL ERROR: JS Allocation failed - process out of memory
Traceback (most recent call last):
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc”, line 1452, in
flush_js_optimizer_queue()
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc”, line 1364, in flush_js_optimizer_queue
final = shared.Building.js_optimizer(final, js_optimizer_queue, jcache, debug_level >= 4, js_optimizer_extra_info)
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\shared.py”, line 1592, in js_optimizer
return js_optimizer.run(filename, passes, listify(NODE_JS), jcache, debug, extra_info)
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\js_optimizer.py”, line 375, in run
return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info))
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\tempfiles.py”, line 39, in run_and_clean
return func()
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\js_optimizer.py”, line 375, in
return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info))
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\js_optimizer.py”, line 285, in run_on_js
filenames = pool.map(run_on_chunk, commands, chunksize=1)
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\multiprocessing\pool.py”, line 250, in map
return self.map_async(func, iterable, chunksize).get()
File “C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\multiprocessing\pool.py”, line 554, in get
raise self._value
AssertionError: Error in js optimizer:

events.js:72
throw er; // Unhandled ‘error’ event
^
Error: write EPIPE
at errnoException (net.js:901:11)
at Object.afterWrite (net.js:718:19)

UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

i’ve built with -o2 and it worked.
I’ve seen in another thread this was caused by a very large function. I’ll double check my code, but from my experience, I never have bigger functions that 200-300 lines of code…

I have also seen this issue. The build process (or more accurately - one of the tools that the build process runs) runs out of memory.

This was said to be fixed in Unity 5.1 if i recall correctly.