我的网站不断崩溃IE,无法调试 [英] My website keeps crashing IE, can't debug

查看:183
本文介绍了我的网站不断崩溃IE,无法调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站突然开始崩溃互联网探险。

I have a website that suddenly started to crash internet explorer.

网站加载并开始执行javascript,但在机器爆炸的某个地方。我甚至不会得到脚本错误,它只是崩溃。我试图用内置调试器手动逐步通过每一行的js,但然后当然不会发生的问题。

The website loads and starts executing javascript but somewhere in there the machinery explodes. I don't even get a script error, it just crashes. I've tried to manually step through every single line of js with the built in debugger but then of course the problem doesn't occur.

如果我选择调试应用程序崩溃时,我看到以下消息。

If i choose to debug the application when it crashes i see the following message.

iexplore.exe中0x6c5dedf5处的未处理异常:0xC0000005:访问冲突读取位置0x00000090。

Unhandled exception at 0x6c5dedf5 in iexplore.exe: 0xC0000005: Access violation reading location 0x00000090.

调用堆栈中的前5个项目看起来像这样

The top 5 items in the call stack looks like this


VGX.dll!6c5dedf5
[下面的框架可能不正确和/或丢失,没有为VGX.dll加载符号]

VGX.dll!6c594d70()

VGX.dll!6c594f63 )

VGX.dll!6c595350()

VGX.dll!6c58f5e3()

mshtml.dll!6f88dd17()

VGX.dll!6c5dedf5()
[Frames below may be incorrect and/or missing, no symbols loaded for VGX.dll]
VGX.dll!6c594d70()
VGX.dll!6c594f63()
VGX.dll!6c595350()
VGX.dll!6c58f5e3()
mshtml.dll!6f88dd17()

VGX.dll似乎是vml渲染器的一部分,我实际上使用的是VML。我不是惊讶,因为我有这么多问题与vml,属性必须按特定的顺序设置,有时你不能设置属性,当你有元素附加到dom或反之亦然(一切未记录btw),但然后问题通常可以在调试时重现,但现在不能重现:

VGX.dll seems to be part of the vml renderer and i am in fact using VML. I'm not suprised because i've had so many problems with vml, attributes has to be set in specific order, sometimes you cant set attributes when you have elements attached to the dom or vice versa (everything undocumented btw) but then the problems can usually be reproduced when debugging but not now :(

问题也出现在没有插件模式。

The problem also occurs in no plugin-mode.

编辑:
添加控制台输出每个可疑的修改, DOM使问题只发生有时(控制台也实现在同一页上的javascript,我能够看到输出,即使在崩溃后,因为窗口仍然可见)显然,它似乎是一种种族条件。

Adding a console outputting every suspect modification to the DOM made the problem only occur sometimes. (the console is also implemented in javascript on the same page, i'm able to see the output even after a crash as the window is still visible) Apparently it seems to be some kind of race condition.

我设法进一步跟踪它,并且似乎发生,当你删除一个对象从DOM太快,刚刚被添加后(很可能只有对于vml-elements有一些特殊的属性,没有尝试进一步)和它不能通过在removeChild前面添加一个死循环(很糟糕的解决方案),该页面必须由浏览器一次后addChild之前可以调用removeChild。叹息

I managed to track it down even further, and it seems to occur when you remove an object from the DOM too quickly after it's just been added. (most likely only for vml-elements with some special attribute, didn't try further) And it can't be fixed by adding a dead loop in front of removeChild(pretty bad solution anyway), the page has to be rendered by the browser once after the addChild before you can call removeChild. sigh

推荐答案

(旧问题,但重要的)

一个非常类似的问题 - 包括很多复杂的VML(来自Raphael),它看起来几乎不可能调试。

I had a very similar problem - including lots of complex VML (from Raphael), and it looked near-impossible to debug.

其实,最简单的低技术方法是最好的。这是一个明显的方法:我在这里写,因为有时当面临一个恐吓的问题,明显的,简单的解决方案是最后一个人想到的。

Actually, it turned out the simplest low-tech approach was the best. It's an obvious approach: I'm writing here because sometimes when faced with an intimidating problem the obvious, simple solutions are the last a person thinks of.

-school调试:许多警报(1); 警报(2); 在我的代码中的每个远程要求或复杂的调用之后,提供超简单的可靠断点,不依赖于任何可能会崩溃的功能(例如开发工具)。然后,只是看到哪个数字警报你崩溃之前 - 在该警报和下一个警报之间必须出现的问题。

So, simple old-school debugging: Lots of alert("1");, alert("2"); etc before and after every remotely demanding or complex call in my code, giving super-simple reliable breakpoints that don't rely on any features (e.g. developer tools) that might themselves crash out. Then, just see which number alert you get to before it crashes - the problem must arise between that alert and the next one.

添加更多提醒,直到缩小到正确的行。在我的情况下,它实际上与复杂的VML无关 - 这是一个for循环,由于某种原因是继续无限只有在IE7。

Add more alerts until you narrow it down to the exact line. In my case, it was actually nothing to do with the complex VML - it was a for loop that, for some reason was continuing infinitely only on IE7.

这篇关于我的网站不断崩溃IE,无法调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆