Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Chrome Update caused : Maximum call stack size exceeded.

6,754 views
Skip to first unread message

Rama MeLon

unread,
Jul 16, 2017, 2:11:36 AM7/16/17
to Chromium-discuss
Dears,
according to last update on google chrome browser we got the below error on our  production

Uncaught RangeError: Maximum call stack size exceeded
    at HTMLSelectElement.onchange (ManageAction_manageCustomerProfileReport.doku:575)
    at Object.trigger (jquery-1.11.0.js:3)
    at HTMLSelectElement.<anonymous> (jquery-1.11.0.js:3)
    at Function.each (jquery-1.11.0.js:2)
    at n.fn.init.each (jquery-1.11.0.js:2)
    at n.fn.init.trigger (jquery-1.11.0.js:3)
    at Chosen.result_select (chosen.jquery.js:1052)
    at Chosen.search_results_mouseup (chosen.jquery.js:945)
    at HTMLUListElement.<anonymous> (chosen.jquery.js:658)
    at HTMLUListElement.dispatch (jquery-1.11.0.js:3)




and this is my html code ....

<select class="chosen-select form-control" onChange="onDefault(this);">



and onChange is

 function onDefault(s){


if (s[s.selectedIndex].value == 'blabla'){


}else if(s[s.selectedIndex].value == 'blabla'){


}else if(s[s.selectedIndex].value == 'blabla'){


}else if(s[s.selectedIndex].value == 'blabla'){


}else if(s[s.selectedIndex].value == 'blabla'){


}else if(s[s.selectedIndex].value == 'blabla'){


}


......over 20

}

PhistucK

unread,
Jul 16, 2017, 2:19:32 AM7/16/17
to rahm...@gmail.com, Chromium-discuss
Your stack trace suggests that you seem to be using some jQuery plugin, so it is not as simple as a <select> with an change event listener.
Can you share a URL with this happens?


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

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

Rama MeLon

unread,
Jul 18, 2017, 2:07:18 AM7/18/17
to Chromium-discuss, rahm...@gmail.com
thanks for your reply, my code is already fixed ,
the issues because jquery plugin on element html select i have over option value over 4000 data 

example 
<a>Testing Select</a>
<select id="list"></select> 

for (var i=0; i<15000; i++) {
        var name = "Option "+i;
        var sel = document.getElementById("list");
        sel.options[sel.options.length] = new Option(name,i);
    }


and i change from option select to text the issues is gone fixed 

thank you all


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

PhistucK

unread,
Jul 18, 2017, 2:12:08 AM7/18/17
to Rama MeLon, Chromium-discuss
​That code does not cause any stack overflow issues for me.
Can you, please, share the entire (though as minimal as possible, if you can) code that reproduces the issue?
If it is a regression, the team would very much like to fix it, but it is hard to debug it if there is no actual reproduction...​


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Rama MeLon

unread,
Nov 27, 2017, 8:51:48 AM11/27/17
to Chromium-discuss, rahm...@gmail.com
thx , you right , the error does not cayse any stack overflow issues for you
but i tricky , input many list into variable in javascript like this 

var listSample = "<#list samples as sample><option value='$sample.id'>${sample.name}</option></#list>";


<select class="chosen-select form-control" id="inputid" '

            +' name="inputhelper" style="width: 99%"> '

            +' <option value="ALL" selected>ALL</option> ' + listSample

            +' </select>


it's work , thx


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

linjia...@gmail.com

unread,
Nov 27, 2017, 8:51:48 AM11/27/17
to Chromium-discuss, rahm...@gmail.com
Hello PhistucK 

I have the same problem. And i can only do the reproduction in Chrome, it run fin in IE or Firefox. 
The problem is that: if i click some times(any action click) in the page, then Chrome will bug for 20 secs, after that, chrome will re-work, if i inspect the page, then i get the message: VM2692:1 Uncaught RangeError: Maximum call stack size exceeded. 

I can not post you the codes, i do not event know which code create this problem, and the codes work fin in IE or Firefox. 

you can just do any click action in this page.


Thanks if you can look for it




PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

rahul kumar

unread,
Apr 13, 2020, 3:13:45 AM4/13/20
to Chromium-discuss, rahm...@gmail.com
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript to consume lots of stack.  Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as the memory that can be allocated for your use is not unlimited. It's possible to cause infinite recursion in a fully promisified code, too. That can happen if the promises in a chain don't actually perform any asynchronous execution , in which case control never really returns to the event loop, even though the code otherwise appears to be asynchronous. That's when it's useful to wrap your recursive function call into a -

  • setTimeout
  • setImmediate or
  • process.nextTick

Also, you can localize the issue by setting a breakpoint on RangeError type of exception , and then adjust the code appropriately. Moreover, you can managed to find the point that was causing the error by check the error details in the Chrome dev toolbar console , this will give you the functions in the call stack, and guide you towards the recursion that's causing the error.


Reply all
Reply to author
Forward
0 new messages