最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Debugging an IE crash - Stack Overflow

programmeradmin0浏览0评论

I have a web application that is working perfectly in Chrome and FireFox, yet is crashing in IE. Note, this is not a JavaScript error, but rather the iexplore.exe process actually crashes.

The code is posted below. This will crash in IE9 (when the button is clicked). Reversing the JavaScript or making changes to the CSS may eliminate the issue, but realize that this is reduced code from a much, much larger application that can not be easily changed in this way (for example, in the actual app the two JavaScript mands are called in two different functions - the second one is run conditionally based on the results of the first). I am not even sure what my question is anymore, other than "is there a way to get Microsoft to patch this quickly?" I am interested in hearing people's thoughts:

<!DOCTYPE html>
<html>
    <head>
        <title>IE Crash</title>
    </head>
    <body>
        <div id="dvStep11" style="width:500px;">
            <label for="inpDOB">Date of Birth (mm/dd/yyyy)</label>
            <input type="text" id="inpDOB" style="width:350px;" />
        </div>
        <button onclick="document.getElementById('inpDOB').value = '12/7/1971';document.getElementById('dvStep11').style.display='none';">Click here</button>
    </body>
</html>

Edit: I have opened a case with Microsoft and am working on this with a development team member there. I will update this as I receive more information.

I have a web application that is working perfectly in Chrome and FireFox, yet is crashing in IE. Note, this is not a JavaScript error, but rather the iexplore.exe process actually crashes.

The code is posted below. This will crash in IE9 (when the button is clicked). Reversing the JavaScript or making changes to the CSS may eliminate the issue, but realize that this is reduced code from a much, much larger application that can not be easily changed in this way (for example, in the actual app the two JavaScript mands are called in two different functions - the second one is run conditionally based on the results of the first). I am not even sure what my question is anymore, other than "is there a way to get Microsoft to patch this quickly?" I am interested in hearing people's thoughts:

<!DOCTYPE html>
<html>
    <head>
        <title>IE Crash</title>
    </head>
    <body>
        <div id="dvStep11" style="width:500px;">
            <label for="inpDOB">Date of Birth (mm/dd/yyyy)</label>
            <input type="text" id="inpDOB" style="width:350px;" />
        </div>
        <button onclick="document.getElementById('inpDOB').value = '12/7/1971';document.getElementById('dvStep11').style.display='none';">Click here</button>
    </body>
</html>

Edit: I have opened a case with Microsoft and am working on this with a development team member there. I will update this as I receive more information.

Share Improve this question edited Aug 6, 2013 at 14:29 Aaron J Spetner asked Apr 9, 2012 at 22:30 Aaron J SpetnerAaron J Spetner 2,1551 gold badge19 silver badges31 bronze badges 7
  • Can you post the website? Is IE fully updated? What version of IE did you use? – rook Commented Apr 9, 2012 at 22:32
  • Sorry, I should have specified I am using the latest version of IE9. I cannot post the actual site, as it is proprietary and confidential. I have used the IE9 debugger to find the line that it is crashing on as I mentioned in the question. I can post a link to the jsFiddle containing the pertinent code, but since it works there, I am not sure how much help it would be. – Aaron J Spetner Commented Apr 9, 2012 at 22:36
  • No code, then no one can help you. Report it to Microsoft. No one else cares, and its M$'s fault anyway. – rook Commented Apr 9, 2012 at 22:38
  • 1 @Rook, the question was not "what is wrong with my code". The question is how would one go about troubleshooting an issue where the actual browser process crashes. I am not looking for someone to fix my code, I am looking for any info on debugging IE crashes in general as they apply. – Aaron J Spetner Commented Apr 9, 2012 at 22:43
  • @Rook, yes that is true. However, I am not looking to discuss the qualities of the Microsoft browser. Given that 40+% of web users still run IE (and with our clientele 90+%), we sometimes have no choice. I know I can send crash reports to Microsoft, and I have - but this is not going to help me solve this issue. I am looking for any ideas in troubleshooting such problems, not to lay blame. :) – Aaron J Spetner Commented Apr 9, 2012 at 22:48
 |  Show 2 more ments

2 Answers 2

Reset to default 9

Microsoft has confirmed to me that this is a bug in the IE9 rendering engine. From my further research, it has to do with the fact that the width of the parent DIV, bined with the width of the INPUT causes the INPUT to wrap. For some reason, in this case when assigning a value to the INPUT and immediately hiding the parent DIV, IE crashes.

Microsoft suggested I force IE to use the IE8 rendering engine (which does not crash) with this line of code:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

I found, however, that I can also just avoid the problem by wrapping the INPUT in its own unstylized DIV or SPAN. This is preferred because, aside from this bug, the IE9 rendering engine is a lot better (and faster) than IE8's.

Funnily, the debugger IE9 brings is quite useful with break points, variable tracking and such, so I would try and see if that can be of any help. (If you can get IE9; I'm not sure about the dev tools in IE 7 and 8).

发布评论

评论列表(0)

  1. 暂无评论