views:

79589

answers:

13

I realise this is not the ideal place to ask about this in terms of searchability, but I've got a page whose JavaScript 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, but I cannot work out for the life of me where the problem is. 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 IE7 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.

+6  A: 

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.

Mitchel Sellers
+5  A: 

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.

glenatron
+1  A: 

Hi every body I had this problem and I solved it. there was an attribute in <%@ Page tag named MaintainScrollPositionOnPostback and after removing it, the error disapeared I added it before for preventing scrolling after each postback

massoud
this solves my problem, thanks!
KG Sosa
A: 

I don t know what to tell you but the same problem occured withJquery table sorting and SEARCH. when there is nothing left in the table where you are searching a string for example, you get this error too. Even in Google analityc this error occures often

FasoService
The cause of the error is typically an unterminated loop or recursive call that just overloads the Javascript engine, but that can happen in a whole lot of different ways.
glenatron
+2  A: 

I ran into this problem recently, and wrote up a post about the particular cause in our code.

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.

Ross Boucher
Very interesting insight into the roots of the problem.
glenatron
A: 

Hello, When building websites from anywhere outside the hosting server, make sure to put the full path in C:\Documents and Settings\user_name\Desktop\New_Site\images..... This fixed my problem. Thanks for the help!!!!!!!!!!!!!!!!!

KerkowichINC
A: 

I started to get this message after a Microsoft Update on 3/3/2010, but the update history shows the last successful update was KB976662 on 2/25/2010, so I am not sure what to look for. As the error completely hosed IE, you can't even use it to troubleshoot the problem. Also, KB9716657 continues to show a Failed status in update history, but I don't understand the significance of this. I am running the latest IE 8.x with Windows Vista Premium. Microsoft only refers to this error regarding IE6. Luckily, I can use almost any other browser without these blasted update problems.

Paul
A: 

I know very about this stuff. If I use IE8, I've continually gotten this error. By hitting return several times, and then hitting the "google search" button with nothing entered into the search bar, I get IE without the newest google updated page. I can then use IE. I don't know why, and I wish I could figure out how to fix the silly thing permanently.

Dawn
A: 

Also having smartNavigation="true" causes this"

CDev
A: 

This is problem with JAVA and Flash Player, Install latest JAVA and FLASH PLAYER, Problem will be resolved. If not then install Mozial firfox till auto install the information required

Manisha
A: 

massoud that MaintainScrollPositionOnPostback removal trick also helped me as well to solve the problem. Thanks!

Christopher Lee
A: 

Install both Adobe Flash Player and Shockwave Player new version.

More info here: http://enrick.net/forums/index.php?topic=332.0

Good Luck!

Enrick
A: 

This afternoon, when plugging in my Dell Studio 1795 laptop i got "stack overflow at line 579". Earlier, at home with no internet access I just ignored it and did normal actiities with no problem. Finally, at work, I plugged in the internet cable, clicked on the 'stack overflow..." message a couple times and it disappeared. I have a feeling it was just the lack of internet access. This has never happened before. I got the laptop at the beginning of February '10. I am technically an idiot.

Richard M. Bernal