none
Simple HTML code with CSS crashes IE9 when tr-element's display set to none

    General discussion

  • This has to be one of the most ridiculous ways to crash Internet Explorer 9 (check that the Browser mode is IE9 and the Document mode is IE9 standards):

     

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        <head></head>
        <body>
            <table style="border-collapse: collapse">
                <tr id="firstrow">
                    <td colspan="2"></td>
                </tr>
                <tr id="secondrow">
                    <td></td>
                    <td style="border: 1px solid #D2D2D2">Move cursor over me to crash browser</td>
                </tr>
            </table>
        </body>
        <style type="text/css">
            #secondrow:hover {
                display: none;
            }
       
        </style>
    </html>

    Wednesday, October 05, 2011 6:44 AM

All replies

  • Hi,

    What is the content-type of your response header?

    2 critical validation errors... (validator.w3.org) (the first is probably cause by no <title> tag).

    1. Line 3, Column 18: end tag for "head" which is not finished
    2. <head></head>
    3. Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>
    4. Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.
    5. ErrorLine 15, Column 28: document type does not allow element "style" here
           <style type="text/css">

      The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

      One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


    Rob^_^
    Wednesday, October 05, 2011 6:53 AM
  • I moved the style to the head-element and added a title, now W3-validator says the page passes (save the HTML in a file with UTF-8 without BOM, same problem also if the page is loaded from a web server with the content-typetext/html;charset=UTF-8 in the response header).
    I would call it a quite serious bug when you can crash the whole browser by just using HTML and CSS.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        <head>
     <style type="text/css">
     #secondrow:hover {
     display: none;
     }    
     </style>
    
    <title>IE9 crash page</title>
    </head>
        <body>
            <table style="border-collapse: collapse">
                <tr id="firstrow">
                    <td colspan="2"></td>
                </tr>
                <tr id="secondrow">
                    <td></td>
                    <td style="border: 1px solid #D2D2D2">Move cursor over me to crash browser</td>
                </tr>
            </table>
        </body>
    </html>

    • Edited by anbrunns Wednesday, October 05, 2011 8:24 AM
    Wednesday, October 05, 2011 8:23 AM
  • application/xml not text/html

    I usually save such files with an xhtml extension and set that extension's mime type to application/xml (see the Mime types option in the IIS console)

    Regards.


    Rob^_^
    Wednesday, October 05, 2011 1:46 PM
  • Here is a HTML5 version (it passes the W3-validator) that also crashes IE9:

     

    <!DOCTYPE html>
    
    <html lang="en">
    
        <head>
    
    	<meta charset=utf-8>
    
    		<style type="text/css">
    
    			#secondrow:hover {
    
    				display: none;
    
    			}    
    
    		</style>	
    
    		<title>IE9 crash page</title>
    
    	</head>
    
        <body>
    
            <table style="border-collapse: collapse">
    
                <tr id="firstrow">
    
                    <td colspan="2"></td>
    
                </tr>
    
                <tr id="secondrow">
    
                    <td></td>
    
                    <td style="border: 1px solid #D2D2D2">Move cursor over me to crash browser</td>
    
                </tr>
    
            </table>
    
        </body>
    
    </html>

     

    And here is a HTML 4.01 strict (it passes the W3-validator) that also crashes IE9:

     

     

     

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    
    <html>
    
    <head>
    
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    		<style type="text/css">
    
    			#secondrow:hover {
    
    				display: none;
    
    			}    
    
    		</style>	
    
    		<title>IE9 crash page</title>
    
    	</head>
    
        <body>
    
            <table style="border-collapse: collapse">
    
                <tr id="firstrow">
    
                    <td colspan="2"></td>
    
                </tr>
    
                <tr id="secondrow">
    
                    <td></td>
    
                    <td style="border: 1px solid #D2D2D2">Move cursor over me to crash browser</td>
    
                </tr>
    
            </table>
    
        </body>
    
    </html>

     

     

     

    The content type is not the main point as it will crash with both application/xml and text/html.

     

    Thursday, October 06, 2011 8:04 AM
  • Hi Anbruns,

    thanks for your patience....

    Here is the corrected html5 page.

    <!DOCTYPE html>
    
    <html lang="en">
    
        <head>
    
    	<meta charset="utf-8">
    
    		<style type="text/css">
    
    			#secondrow:hover {
    
    				display: none;
    
    			}    
    
    		</style>	
    
    		<title>IE9 crash page</title>
    
    	</head>
    
        <body>
    
            <table style="border-collapse: collapse">
    
                <tr id="firstrow">
    
                    <td colspan="2">&nbsp;</td>
    
                </tr>
    
                <tr id="secondrow">
    
                    <td>&nbsp;</td>
    
                    <td style="border: 1px solid #D2D2D2">Move cursor over me to crash browser</td>
    
                </tr>
    
            </table>
    
        </body>
    
    </html>

    You will see that I have closed the attribute values with double quotes (xhtml syntax) AND

    added &nbsp; to the empty table cellls..... this is important as different browsers treat empty cells differently. There is a table-only style rule for the treatment of empty cells in tables. If not specified IE browsers will ignore empty table cells, while some other browsers ADD &nbsp; to the empty cells.

    the good news is that I can reproduce your error.

    I see that you are a MS Partner.... I am not a MS employee. (this is a public forum). Feedback for IE should be submitted to connect.microsoft.com/ie (live ID and connect account required).

    Here is the error log for the error produced.

    Log Name:      Application
    Source:        Application Error
    Date:          7/10/2011 9:19:37 AM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      Wollongong
    Description:
    Faulting application name: IEXPLORE.EXE, version: 9.0.8112.16421, time stamp: 0x4d76255d
    Faulting module name: MSHTML.dll, version: 9.0.8112.16434, time stamp: 0x4e28e61f
    Exception code: 0xc0000005
    Fault offset: 0x000208ab
    Faulting process id: 0x1274
    Faulting application start time: 0x01cc84760798c685
    Faulting application path: C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE
    Faulting module path: C:\Windows\system32\MSHTML.dll
    Report Id: 468efce1-f069-11e0-82a1-001e101f4e71
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2011-10-06T22:19:37.000000000Z" />
        <EventRecordID>14224</EventRecordID>
        <Channel>Application</Channel>
        <Computer>Wollongong</Computer>
        <Security />
      </System>
      <EventData>
        <Data>IEXPLORE.EXE</Data>
        <Data>9.0.8112.16421</Data>
        <Data>4d76255d</Data>
        <Data>MSHTML.dll</Data>
        <Data>9.0.8112.16434</Data>
        <Data>4e28e61f</Data>
        <Data>c0000005</Data>
        <Data>000208ab</Data>
        <Data>1274</Data>
        <Data>01cc84760798c685</Data>
        <Data>C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE</Data>
        <Data>C:\Windows\system32\MSHTML.dll</Data>
        <Data>468efce1-f069-11e0-82a1-001e101f4e71</Data>
      </EventData>
    </Event>

    No doubt about it..... the crashing module is mshtml

    the above error has already been sent to MS (as I am in their Telementary programs), but also I have opened a Issue ticket at connect on your behalf.

    For your reference please refer to this link

    https://connect.microsoft.com/IE/feedback/details/693470/mshtml-crash-on-tr-hover

     

    Please understand that I do not work for MS and that your should use the formal feedback portal at connect to submit issue reports.

    I insisted on validated markup because it is important that any issue reports raised are not false positive...... the w3 standards documentation and the MS test cases are the acid standard when accessing the compliance to those standards.

    Regards.

     

     

     

     


    Rob^_^
    Thursday, October 06, 2011 10:56 PM
  • Thank you for registering the issue. I couldn't find any page to report IE-bugs so I used this forum.

    Ps. HTML5 allows attributes without quotes if the value of the attribute doesn't contain any space, but it looks more nice with the double quotes. :-)

    Friday, October 07, 2011 7:05 AM
  • Hello, I clicked the link with the bug report and get a page not found
    after logging in. Was this issue ever taken care of? Has a solution/work
    around been found?

    Wednesday, July 11, 2012 3:30 PM
  • @anbrunns

    xhtml syntax requires attribute values to be in double quotes... validator.w3.org


    Rob^_^

    Saturday, July 14, 2012 9:11 AM
  • @Larry

    these are public forums ... we do not work for or represent MS. try connect again.

    Please start your own question with a link to your website.... it is unlikely that your issue is the same unless you are using the same web page (exactly)... validate your markup first... F12>Validate>HTML or copy and paste your markup at validator.w3.org

    syntax validation errors are just that... errors... you have to correct your errors just as you would for a programming language...junk in, junk out.


    Rob^_^


    Saturday, July 14, 2012 9:12 AM
  • @bep

    Please start your own questions..

    http://validator.w3.org/check?uri=http%3A//bepcongnghiep.asia/ 135 errors... well done... near record number of errors. You testing cycle should include a markup and css validation check at validator.w3.org (F12>Validate>HTML)

    your web site never reaches a readystate of completed.... check for newer versions of Mootools and Mootools FX and reduce the number of ascrynous XMLHTTP requests or use jQuery instead. Your server supports a maximum of 6.


    Rob^_^

    Saturday, July 14, 2012 9:33 PM