“Stack overflow in line 0” on Internet Explorer

后端 未结 13 2069
时光取名叫无心
时光取名叫无心 2020-12-14 00:48

I realise this is not the ideal place to ask about this in terms of searchability, but I\'ve got a page whose JavaScript code throws \"Stack overflow in line 0\" errors when

相关标签:
13条回答
  • 2020-12-14 01:16

    I ran into this problem recently and wrote up a post about the particular case in our code that was causing this problem.

    http://cappuccino.org/discuss/2010/03/01/internet-explorer-global-variables-and-stack-overflows/

    The quick summary is: recursion that passes through the host global object is limited to a stack depth of 13. In other words, if the reference your function call is using (not necessarily the function itself) was defined with some form window.foo = function, then recursing through foo is limited to a depth of 13.

    0 讨论(0)
  • 2020-12-14 01:18

    I had this problem, and I solved it. There was an attribute in the <%@ Page tag named MaintainScrollPositionOnPostback and after removing it, the error disapeared. I added it before to prevent scrolling after each postback.

    0 讨论(0)
  • 2020-12-14 01:21

    You can turn off the "Disable Script Debugging" option inside of Internet Explorer and start debugging with Visual Studio if you happen to have that around.

    I've found that it is one of few ways to diagnose some of those IE specific issues.

    0 讨论(0)
  • 2020-12-14 01:21

    Aha!

    I had an OnError() event in some code that was setting the image source to a default image path if it wasn't found. Of course, if the default image path wasn't found it would trigger the error handler...

    For people who have a similar problem but not the same, I guess the cause of this is most likely to be either an unterminated loop, an event handler that triggers itself or something similar that throws the JavaScript engine into a spin.

    0 讨论(0)
  • 2020-12-14 01:21

    I set up a default project and found out the following:

    The problem is the combination of smartNavigation and maintainScrollPositionOnPostBack. The error only occurs when both are set to true.

    In my case, the error was produced by:

    <pages smartNavigation="true" maintainScrollPositionOnPostBack="true" />
    

    Any other combination works fine.

    Can anybody confirm this?

    0 讨论(0)
  • 2020-12-14 01:23

    This is problem with Java and Flash Player. Install the latest Java and Flash Player, and the problem will be resolved. If not, then install Mozilla Firefox, it will auto install the updates required.

    0 讨论(0)
提交回复
热议问题