run.rb icon indicating copy to clipboard operation
run.rb copied to clipboard

Uncaught RangeError: Maximum call stack size exceeded

Open nleskiw opened this issue 6 years ago • 1 comments

Running the default Hello World app or other valid code never completes on Linux Chrome Version 62.0.3202.94 (Official Build) (64-bit)

JS Console Output:

index.js:4027 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
s @ index.js:4027
d90cade9c5ff2360f713.worker.js:1 Uncaught RangeError: Maximum call stack size exceeded
Ruby.worker.js:44 Uncaught RangeError: Maximum call stack size exceeded
d90cade9c5ff2360f713.worker.js:1 Uncaught RangeError: Maximum call stack size exceeded
Ruby.worker.js:44 Uncaught RangeError: Maximum call stack size exceeded

If you need any other details please advise

nleskiw avatar Jan 25 '19 00:01 nleskiw

@damaneice and I tried a lot of different configurations. The reason this is happening has something to do with the _compile_array internals and the problem is solved using emscripten 1.38.32+ and adding the flag -Os or -Oz (https://emscripten.org/docs/optimizing/Optimizing-Code.html#optimizing-code-size) to the emcc call when building the WASM.

To fix this we added that flag here https://github.com/jasoncharnes/run.rb/blob/master/src/emscripten/ruby-2.6.1/Dockerfile#L23

jeffrafter avatar Jun 14 '19 19:06 jeffrafter