My site continues to crash IE, cannot debug

I have a website that suddenly began to crash Internet Explorer.

The website loads and runs javascript, but somewhere there the machine explodes. I don't even get the script error, it just crashes. I tried to manually go through each js line with a built-in debugger, but then, of course, the problem does not arise.

If I decide to debug the application when it crashes, I see the following message.

Unhandled exception at 0x6c5dedf5 in iexplore.exe: 0xC0000005: read access violation location 0x00000090.

The top 5 items in the call stack look like this:

Vgx.dll! 6c5dedf5 ()
[The frames below may be incorrect and / or missing, characters loaded for VGX.dll]
Vgx.dll! 6c594d70 ()
Vgx.dll! 6c594f63 ()
Vgx.dll! 6c595350 ()
Vgx.dll! 6c58f5e3 ()
mshtml.dll! 6f88dd17 ()

VGX.dll seems to be part of the vml renderer, and I actually use VML. I am not surprised because I had so many problems with vml, attributes must be set in a certain order, sometimes you cannot set attributes when you have elements attached to dom or vice versa (all undocumented by the way), but then problems usually can be played during debugging, but not now :(

The problem also occurs without plugins.

Is there a better way than trial and error to solve this problem?

Edit: Adding a console displaying each suspicious modification to the DOM caused the problem only occasionally. (the console is also implemented in javascript on the same page, I can see the result even after a crash, since the window is still visible). Apparently, this looks like some kind of race condition.

I managed to track it even more, and it seems to happen when you delete an object from the DOM too quickly after adding it. (most likely, only for vml elements with some special attribute, they no longer tried) And it cannot be fixed by adding a dead loop before removeChild (in any case, this is a pretty bad solution), the page should be displayed once after addChild browser before you can call removeChild. Sigh

+7
javascript debugging internet-explorer crash vml
source share
5 answers

(old question, but important)

I had a very similar problem - including a lot of complex VML (from Raphael), and it was almost impossible to debug.

In fact, it turned out that the simplest low-tech approach was the best. This is an obvious approach: I write here because sometimes, when confronted with an intimidating problem, obvious simple solutions are the last thing a person thinks of.

So, a simple debugging of the old school: a lot of alert("1"); , alert("2"); etc. before and after each remote or complex call in my code, providing ultra-simple reliable breakpoints that are not dependent on any functions (for example, developer tools) that themselves can crash. Then just see what kind of numerical warning you get before it works - a problem should arise between this warning and the next.

Add more warnings until you narrow them down to the desired line. In my case, it was actually not connected with complex VML - it was a for loop, which for some reason continued indefinitely only on IE7.

+4
source share

Stop using VML?

If you need things in IE that are really impossible to do by moving, scaling, cropping and replacing images, consider using Flash, Silverlight, or the like.

If your life depends on VML, then read as much as possible about other people's experiences that can facilitate trial and error.

+1
source share

Null pointer dereference property not used

+1
source share

Make sure your scripts are run after the DOMReady event. IE is notorious for crashing when changing the DOM to a full load.

In some cases, IE may prematurely fire the DOMReady event. Read more on how to overcome this here and here .

0
source share

Are you using JSONP in any form? Popular implementations such as jQuery tend to try to clear memory by removing the script node from the DOM after it starts. In many cases, I have seen this problem with Internet Explorer. I could never understand what other conditions should be around to cause a crash. Too many things that happen on my other pages.

Anyway, if you use jQuery.getJSON, check the following line in the jquery source: (line 5556 in jQuery 1.4.3):

  } else { // Garbage collect window[ jsonp ] = undefined; try { delete window[ jsonp ]; } catch( jsonpError ) {} } if ( head ) { head.removeChild( script ); } 

You can safely remove this or conditionally determine that this only happens in browsers other than IE. Hope this helps.

0
source share

All Articles