"Uncaught RangeError: Maximum call stack size exceeded" Encountered when Opening a large JS File

794 views
Skip to first unread message

awt

unread,
Mar 2, 2016, 5:12:43 AM3/2/16
to emscripten-discuss
Hi,

I was trying to open my application on Chrome which is quite large and I encountered the following error:

"Uncaught RangeError: Maximum call stack size exceeded"

The console showed that the error happened at the following line:

var asm = (function(global,env,buffer) {

Can I assume that the error occurs because the size of my asm.js file is just too large and that the only way to get it to run on Chrome is to reduce the JS size? My application runs fine on Firefox by the way.

Alon Zakai

unread,
Mar 2, 2016, 1:40:29 PM3/2/16
to emscripten-discuss
Yes, you're hitting a limitation of Chrome's JS engine.

Is that on a fully-optimized JS? I've seen this on -O0 and -O1 builds on Chrome, but -O2 and above should be ok (if not, we need to look into a workaround).

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

awt

unread,
Mar 3, 2016, 11:36:27 AM3/3/16
to emscripten-discuss
Unfortunately, I'm already using Oz with the --profiling setting to enable some simple debugging. Are there ways to work around this issue?
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

Alon Zakai

unread,
Mar 3, 2016, 12:37:10 PM3/3/16
to emscripten-discuss
That setting should work, so this surprises me. Can you provide a public build that I can test on?

Does the problem happen without --profiling? Also, what chrome version is this, on what OS, and 32/64 bit?

To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

awt

unread,
Mar 4, 2016, 3:25:14 AM3/4/16
to emscripten-discuss
I'm testing my company's code now so I'm afraid I can't make it public. These are the sizes for my files:

xxx.worker.js ~100mb
xxx.js.mem ~9mb

My Chrome info:
Version 48.0.2564.116 beta-m (64-bit)
OS: Windows 10 (64bit)

Thanks for your help :)

On Friday, March 4, 2016 at 1:37:10 AM UTC+8, Alon Zakai wrote:
That setting should work, so this surprises me. Can you provide a public build that I can test on?

Does the problem happen without --profiling? Also, what chrome version is this, on what OS, and 32/64 bit?
On Thu, Mar 3, 2016 at 8:36 AM, awt <knigh...@gmail.com> wrote:
Unfortunately, I'm already using Oz with the --profiling setting to enable some simple debugging. Are there ways to work around this issue?

On Thursday, March 3, 2016 at 2:40:29 AM UTC+8, Alon Zakai wrote:
Yes, you're hitting a limitation of Chrome's JS engine.

Is that on a fully-optimized JS? I've seen this on -O0 and -O1 builds on Chrome, but -O2 and above should be ok (if not, we need to look into a workaround).
On Wed, Mar 2, 2016 at 2:12 AM, awt <knigh...@gmail.com> wrote:
Hi,

I was trying to open my application on Chrome which is quite large and I encountered the following error:

"Uncaught RangeError: Maximum call stack size exceeded"

The console showed that the error happened at the following line:

var asm = (function(global,env,buffer) {

Can I assume that the error occurs because the size of my asm.js file is just too large and that the only way to get it to run on Chrome is to reduce the JS size? My application runs fine on Firefox by the way.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

awt

unread,
Mar 4, 2016, 3:27:44 AM3/4/16
to emscripten-discuss
Sorry, I forgot to mention that the problem doesn't happen if I remove --profiling because the size of the js file gets reduced substantially.

Alon Zakai

unread,
Mar 4, 2016, 2:33:53 PM3/4/16
to emscripten-discuss
Hmm, I was hoping this was a chrome 32-bit issue. Sad to see it on 64.

The best thing is to file a bug on chrome so they can fix it. Without a public build, though, we can't do that. Perhaps though you can narrow it down to something, like maybe one specific function, in which case, an artificial testcase could be created based on that, that could be public?

To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages