“Stack overflow in line 0” on Internet Explorer

2019-01-22 05:38发布

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 I look at it in Internet Explorer.

The problem is quite clearly not in line 0, but somewhere in the list of stuff that I'm writing to the document. Everything works fine in Firefox, so I don't have the delights of Firebug and friends to assist in troubleshooting.

Are there any standard causes for this? I'm guessing this is probably an Internet Explorer 7 bug or something quite obscure, and my Google-fu is bringing me little joy currently. I can find lots of people who have run into this before, but I can't seem to find how they solved it.

13条回答
Root(大扎)
2楼-- · 2019-01-22 06:14

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.

查看更多
够拽才男人
3楼-- · 2019-01-22 06:20

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.

查看更多
时光不老,我们不散
4楼-- · 2019-01-22 06:21

I have reproduced the same error on IE8. One of the text boxes has some event handlers to replace not valid data.

$('.numbersonly').on("keyup input propertychange", function () {
    //code
});

The error message was shown on entering data to this text box. We removed event "propertychange" from the code above and now it works correctly.

P.S. maybe it will help somebody

查看更多
爷的心禁止访问
5楼-- · 2019-01-22 06:22

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.

查看更多
倾城 Initia
6楼-- · 2019-01-22 06:23

Also having smartNavigation="true" causes this"

查看更多
聊天终结者
7楼-- · 2019-01-22 06:27

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.

查看更多
登录 后发表回答