Maximum call stack size exceeded error

2018-12-31 05:02发布

I am using a Direct Web Remoting (DWR) JavaScript library file and am getting an error only in Safari (desktop and iPad)

It says

Maximum call stack size exceeded.

What exactly does this error mean and does it stop processing completely?

Also any fix for Safari browser (Actually on the iPad Safari, it says

JS:execution exceeded timeout

which I am assuming is the same call stack issue)

24条回答
爱死公子算了
2楼-- · 2018-12-31 05:34

I was facing same issue I have resolved it by removing a field name which was used twice on ajax e.g

    jQuery.ajax({
    url : '/search-result',
    data : {
      searchField : searchField,
      searchFieldValue : searchField,
      nid    :  nid,
      indexName : indexName,
      indexType : indexType
    },
.....
查看更多
余生请多指教
3楼-- · 2018-12-31 05:35

You can sometimes get this if you accidentally import/embed the same JS file twice, worth checking in your resources tab of the inspector :)

查看更多
裙下三千臣
4楼-- · 2018-12-31 05:36

In my case, I was sending input elements instead of their values:

$.post( '',{ registerName: $('#registerName') } )

Instead of:

$.post( '',{ registerName: $('#registerName').val() } )

This froze my Chrome tab to a point it did even show me the 'Wait/Kill' dialog for when the page becomes unresponsive...

查看更多
明月照影归
5楼-- · 2018-12-31 05:36

In my case, I was converting a large byte array into a string using the following:

String.fromCharCode.apply(null, new Uint16Array(bytes))

bytes contained several million entries, which is too big to fit on the stack.

查看更多
倾城一夜雪
6楼-- · 2018-12-31 05:36

in my case I m getting this error on ajax call and the data I tried to pass that variable haven't defined, that is showing me this error but not describing that variable not defined. I added defined that variable n got value.

查看更多
流年柔荑漫光年
7楼-- · 2018-12-31 05:36

I had this error because I had two JS Functions with the same name

查看更多
登录 后发表回答