none
IE8 repeatable crash when Javascript updates <img src=...> tag RRS feed

  • 常规讨论

  • While working on developing a small website, I have found a repeatable crash in IE8 which did not happen in IE6/7.  Ideally IE8 could be fixed to behave like IE6/7, but if there is a way I can work around the problem on my end, that's OK, too.

    The problem only occurs if the website contains frames, and inside of one of the frames, Javascript updates the "src" field in an <img ...> tag.  It does not matter if the URL for the image is changing or not.  This problem does not occur if IE8 reads the HTML directly from the hard drive, only if it is served up by an HTTP server.  Here is the simplest form of the code which re-creates the problem:

    File testindex.html:
    <html>
    <head>
    <title>Test Page</title>
    </head>
    
    <frameset cols="145, 100%">
    	<frame name="menuframe" src="testmenu.html" scrolling=no>
    	<frame name="mainframe" src="testa.html">
    </frameset>
    </html>
    File testmenu.html:
    <html>
    <head>
    </head>
    <body>
    Menu frame.
    </body>
    </html>
    File testa.html:
    <HTML>
    <HEAD>
    <title>Test Page</title>
    <script type="text/javascript">
    var blanklightImg = new Image ();
    blanklightImg.src = "pic/blanklight.bmp" ;
    
    function BlinkLight()
    {
    	document.myimgname.src = blanklightImg.src;
    	setTimeout ( "BlinkLight();", 20 );
    }
    </script>
    </HEAD>
    <BODY onload="BlinkLight();">
    Hello, world!<br />
    Blink Light: <img name=myimgname src="pic/blanklight.bmp"><br />
    </BODY>
    </HTML>
    


    After a few minutes, IE8 blinks/restores the page and pops up a notification that "This tab has been recovered."

    After a couple iterations of that, eventually IE8 redirects to a new URL:
    res://ieframe.dll/acr_error.htm#,http://nnnnn/testindex.html
    We were unable to return you to the page you were viewing. 
    Internet Explorer has stopped trying to restore this website. It appears that the website continues to have a problem.

    What can be done to fix this?

    Thanks!
    2010年1月19日 23:23

全部回复

  • Hi,

    This is Chinese forum, You may get an answer sooner if you post it in a English forum.

    Thanks
    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support
    2010年1月27日 9:18
    版主