Pure HTML & CSS code that crashes IE7/8

Discussion in 'Internet Explorer' started by Eric Caron, Jul 2, 2009.

  1. Eric Caron

    Eric Caron Guest

    The following code will crash Internet Explorer. Although clearer proper HTML
    would not cause this issue, such could should at worst result in a poorly
    formatted page, not a full program crash.
    ****
    <html><head>
    <style type="text/css">
    #a {
    margin:0 10px 10px;
    }
    #b {
    width:100%;
    }
    </style>
    <title>IE Crasher</title>
    </head>
    <body>
    <table><tr><td>
    <div id="a">
    <form id="b">
    <input type="text" name="test"/>
    </div>
    </td><td width="1"></td></tr></table>
    </body></html>
     
    Eric Caron, Jul 2, 2009
    #1
    1. Advertisements

  2. "Eric Caron" wrote ...
    > The following code will crash Internet Explorer. Although clearer proper
    > HTML
    > would not cause this issue, such could should at worst result in a poorly
    > formatted page, not a full program crash.
    > ****
    > <html><head>
    > <style type="text/css">
    > #a {
    > margin:0 10px 10px;
    > }
    > #b {
    > width:100%;
    > }
    > </style>
    > <title>IE Crasher</title>
    > </head>
    > <body>
    > <table><tr><td>
    > <div id="a">
    > <form id="b">
    > <input type="text" name="test"/>
    > </div>
    > </td><td width="1"></td></tr></table>
    > </body></html>


    Doesn't "crash" when you provide the missing: </form>

    "Crash" in my test was IE6 displaying a blank page with hourglass cursor.
    Easily closed with the window close [X] button.
     
    Richard Crowley, Jul 2, 2009
    #2
    1. Advertisements

  3. Eric Caron

    Eric Caron Guest

    "Richard Crowley" wrote:
    > Doesn't "crash" when you provide the missing: </form>
    >
    > "Crash" in my test was IE6 displaying a blank page with hourglass cursor.
    > Easily closed with the window close [X] button.
    >


    Which is why I prefaced the post with "Although clearer proper HTML
    would not cause this issue". Removing the CSS, the div, the table, etc all
    cause this code to not crash IE. (BTW, it crashes IE6 politely - but IE8
    crashes really hard). This code started from a crash ifrom a >800 line HTML
    file and I narrowed it down to being this combination of structures that
    produces a crash.

    I'm not looking for a solution on how to fix this - I thought the IE dev
    team deserved to know a bug (not relying on JS or ActiveX) that would cause
    the browser to break.
     
    Eric Caron, Jul 2, 2009
    #3
  4. Eric wrote on Wed, 1 Jul 2009 21:32:05 -0700:

    > "Richard Crowley" wrote:
    >> Doesn't "crash" when you provide the missing: </form>


    >> "Crash" in my test was IE6 displaying a blank page with hourglass
    >> cursor.
    >> Easily closed with the window close [X] button.



    > Which is why I prefaced the post with "Although clearer proper HTML
    > would not cause this issue". Removing the CSS, the div, the table, etc
    > all cause this code to not crash IE. (BTW, it crashes IE6 politely -
    > but IE8 crashes really hard). This code started from a crash ifrom a
    > >800 line HTML file and I narrowed it down to being this combination

    > of structures that produces a crash.


    > I'm not looking for a solution on how to fix this - I thought the IE
    > dev team deserved to know a bug (not relying on JS or ActiveX) that
    > would cause the browser to break.


    IE8 on mine did the same as IE6 on Richard's PC - blank screen with
    hourglass. No hard crash, but it did hang.

    Adding the </form> and </div> that are missing cures it - there's no need to
    remove anything, you just need to create valid HTML instead of lazy junk
    with missing tags. A few seconds with a HTML validator would have sorted
    that out.

    While it would be nice for IE to not get stuck like this, it would be much
    better for HTML authors to take a little more time and not put badly
    formatted junk into their sites.

    --
    Dan
     
    Daniel Crichton, Jul 2, 2009
    #4
  5. Eric Caron

    Ron Sommer Guest

    I see one div and one /div. Where is the second div?
    --
    Ron Sommer

    "Daniel Crichton" <> wrote in message
    news:eXBftZv#...
    snipped
    >
    > Adding the </form> and </div> that are missing cures it - there's no need
    > to remove anything, you just need to create valid HTML instead of lazy
    > junk with missing tags. A few seconds with a HTML validator would have
    > sorted that out.
    >
    > While it would be nice for IE to not get stuck like this, it would be much
    > better for HTML authors to take a little more time and not put badly
    > formatted junk into their sites.
    >
    > --
    > Dan
    >
     
    Ron Sommer, Jul 2, 2009
    #5
  6. Outlook Express was hiding the closing div, sorry.

    Dan


    Ron wrote on Thu, 2 Jul 2009 05:55:07 -0500:

    > I see one div and one /div. Where is the second div?
    > --
    > Ron Sommer


    > "Daniel Crichton" <> wrote in message news:eXBftZv#...
    > snipped


    >> Adding the </form> and </div> that are missing cures it - there's no
    >> need to remove anything, you just need to create valid HTML instead
    >> of lazy junk with missing tags. A few seconds with a HTML validator
    >> would have sorted that out.


    >> While it would be nice for IE to not get stuck like this, it would be
    >> much better for HTML authors to take a little more time and not put
    >> badly formatted junk into their sites.


    >> --
    >> Dan
     
    Daniel Crichton, Jul 2, 2009
    #6
  7. OE, mishandling improperly nested tags, quasi-freezes system

    The previous message was posted Thu 2 Jul 2009 12:25:40 GMT by me "Michel Merlin",
    under the only name Google could give me ("Merlin1940"),
    on the group http://groups.google.com/group/microsoft.public.internetexplorer.general "microsoft.public.internetexplorer.general" > http://groups.google.com/group/micr...er.general/browse_frm/thread/80a2645dc598a4b2
    "Pure HTML & CSS code that crashes IE7/8",
    as message http://groups.google.com/group/micr...read/thread/80a2645dc598a4b2#c740692c2b09a004
    "OE, mishandling improperly nested tags, quasi-freezes system".

    Sorry, Google despite the lot it already does, can't so far avoid splitting one's assets and groups.

    Versailles, Thu 2 Jul 2009 14:52:00 +0200

    ----- Parent Message -----
    From: "Merlin1940" <>
    Newsgroup: news:msnews.microsoft.com/microsoft.public.internetexplorer.general
    Message: news:msnews.microsoft.com/d522c9c2-20d6-45c4-a411-6f59d835b655@s9g2000yqd..googlegroups.com
    Sent: Thu 2 Jul 2009 05:25:40 -0700 (12:25:40 GMT)
    Subject: Re: Pure HTML & CSS code that crashes IE7/8

    OE, mishandling improperly nested tags, quasi-freezes system
    ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    1) On Thu 02 Jul 2009 04:32:05 GMT, "Eric Caron" wrote:
    « Which is why I prefaced the post with... »

    I totally support you on this. You have all sorts of people:

    - the most careful use to write properly AND to be fault-tolerant to
    others; being careful takes a lot of time, so these people POST VERY
    LITTLE; this is just what you are doing;
    - the most reckless use to write casually hence improperly AND to be
    intolerant to others' real OR SUPPOSED faults; being casual uses
    little time, so these people POST A LOT;
    - the most numerous are inbetween, more on the careful side but little
    involved in the particular issue, which make them POST VERY LITTLE OR
    NOT AT ALL.

    The above thread perfectly illustrates this - and should NOT dilute
    and slow down the efforts you are making to find solutions tolerant to
    others' faults:
    « I thought the IE dev team deserved to know a bug (not relying on JS
    or ActiveX) that would cause the browser to break ».
    I hope your report will be forwarded to the dev team and finally get
    corrected.

    2) I complete with my test, under Windows XP Pro 32bits (2GB RAM,
    Pentium M760 2GHz) with the http://blogs.msdn.com/tonyschr/archive/2005/05/25/421923.aspx
    "Desktop Heap Limit" changed from 3,072 (default) to 8,192:

    - the sample, automatically completed by OE (closing FORM added AFTER
    the closing TABLE), still fails: IE6 slows *not all but a vast number
    of* my open IE and OE windows; even Task Manager is slowed nearly to
    freeze; after a moment the faulty IE window's Taskbar icon lets me
    Right-Click it and close it, then after another delay it does close
    and immediately everything is OK.
    - that OE-completed sample, once corrected (just the "<FORM id=b>"
    being moved BEFORE the OPENING "TABLE" tag), works OK.

    I did no test in other browsers (lack time right now)

    Versailles, Thu 2 Jul 2009 14:25:40 +0200
     
    Michel Merlin, Jul 2, 2009
    #7
  8. Eric Caron

    Guest

    Wow, I can't believe a few missing tags could do this. Thanks for pointing this out.

    Contrary to some folks belief, it's pretty easy to miss a tag if you're coding a large site with hundreds of tpl's alongside other bits and pieces hard coded in various php, ajax, etc, files by a team of 2-5+ people. Thank goodness for beta testers.
     
    , Jun 21, 2012
    #8
  9. Eric Caron

    Gady Guest

    On Thursday, 21 June 2012 18:32:55 UTC+3, wrote:
    > Wow, I can't believe a few missing tags could do this. Thanks for pointing this out.
    >
    > Contrary to some folks belief, it's pretty easy to miss a tag if you're coding a large site with hundreds of tpl's alongside other bits and pieces hard coded in various php, ajax, etc, files by a team of 2-5+ people. Thank goodness for beta testers.


    Thank goodness for HAML : http://haml.info/
     
    Gady, Jun 21, 2012
    #9
  10. Eric Caron

    Guest

    On Thursday, June 21, 2012 5:32:55 PM UTC+2, wrote:
    > Wow, I can't believe a few missing tags could do this. Thanks for pointing this out.
    >
    > Contrary to some folks belief, it's pretty easy to miss a tag if you're coding a large site with hundreds of tpl's alongside other bits and pieces hard coded in various php, ajax, etc, files by a team of 2-5+ people. Thank goodness for beta testers.


    This wouldn't have occurred with Opa, which does some HTML verification at compile time (that every tag are closed for example) among a lot of other things.

    http://opalang.org/
     
    , Jun 22, 2012
    #10
  11. Eric Caron

    Guest

    On Wednesday, July 1, 2009 7:00:01 PM UTC-7, Eric Caron wrote:
    > The following code will crash Internet Explorer. Although clearer proper HTML
    > would not cause this issue, such could should at worst result in a poorly
    > formatted page, not a full program crash.
    > ****
    > <html><head>
    > <style type="text/css">
    > #a {
    > margin:0 10px 10px;
    > }
    > #b {
    > width:100%;
    > }
    > </style>
    > <title>IE Crasher</title>
    > </head>
    > <body>
    > <table><tr><td>
    > <div id="a">
    > <form id="b">
    > <input type="text" name="test"/>
    > </div>
    > </td><td width="1"></td></tr></table>
    > </body></html>


    Actually, it doesn't crash IE10. Loads perfectly and I see all the text :)
     
    , Jan 9, 2013
    #11
  12. Eric Caron

    Guest

    I'm using IE10 and it did not crash, even though the page said it would.
     
    , Sep 27, 2013
    #12
  13. Eric Caron

    Mayayana Guest

    <> wrote in message
    news:...
    | I'm using IE10 and it did not crash, even though the page said it would.

    You're posting is meaningless. There's no sign
    of what you're responding to. I'm guessing it
    was 10 years old and you didn't even notice.

    Please look up "usenet" and "nntp". Then get a
    normal newsreader and find a new server. One option
    is http://eternal-september.org/

    Then subscribe to this group:

    microsoft.public.internetexplorer.general

    Then you can actually say something relevant
    in the group. Google Groups online web forum is
    not a news reader. Using it only creates problems
    for everyone.
     
    Mayayana, Sep 27, 2013
    #13
  14. Eric Caron

    Guest

    W dniu czwartek, 2 lipca 2009 04:00:01 UTC+2 użytkownik Eric Caron napisał:
    > The following code will crash Internet Explorer. Although clearer proper HTML
    > would not cause this issue, such could should at worst result in a poorly
    > formatted page, not a full program crash.
    > ****
    > <html><head>
    > <style type="text/css">
    > #a {
    > margin:0 10px 10px;
    > }
    > #b {
    > width:100%;
    > }
    > </style>
    > <title>IE Crasher</title>
    > </head>
    > <body>
    > <table><tr><td>
    > <div id="a">
    > <form id="b">
    > <input type="text" name="test"/>
    > </div>
    > </td><td width="1"></td></tr></table>
    > </body></html>
     
    , Apr 23, 2014
    #14
  15. Eric Caron

    Guest

    On Wednesday, July 1, 2009 10:00:01 PM UTC-4, Eric Caron wrote:
    > The following code will crash Internet Explorer. Although clearer proper HTML
    > would not cause this issue, such could should at worst result in a poorly
    > formatted page, not a full program crash.
    > ****
    > <html><head>
    > <style type="text/css">
    > #a {
    > margin:0 10px 10px;
    > }
    > #b {
    > width:100%;
    > }
    > </style>
    > <title>IE Crasher</title>
    > </head>
    > <body>
    > <table><tr><td>
    > <div id="a">
    > <form id="b">
    > <input type="text" name="test"/>
    > </div>
    > </td><td width="1"></td></tr></table>
    > </body></html>
     
    , Apr 23, 2014
    #15
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dhanabal
    Replies:
    0
    Views:
    479
    Dhanabal
    May 29, 2008
  2. sean_n
    Replies:
    1
    Views:
    498
    Tim Roberts
    May 11, 2008
  3. TestMan
    Replies:
    2
    Views:
    572
    TestMan
    Apr 25, 2006
  4. Jelle

    CSS html a tag

    Jelle, Sep 29, 2006, in forum: Internet Explorer
    Replies:
    0
    Views:
    274
    Jelle
    Sep 29, 2006
  5. the_dude

    Bug Found - CSS / HTML parsing

    the_dude, Nov 22, 2006, in forum: Internet Explorer
    Replies:
    3
    Views:
    246
    Bob Eyster
    Nov 30, 2006
  6. Will Fastie

    CSS Rendering Bug - CSS Comment

    Will Fastie, May 21, 2007, in forum: Internet Explorer
    Replies:
    4
    Views:
    570
  7. Maya

    IE7 crashed with this HTML+CSS code

    Maya, Aug 30, 2008, in forum: Internet Explorer
    Replies:
    2
    Views:
    346
  8. Art Bunch

    Do i need windows 8 security updates???

    Art Bunch, Jul 9, 2016, in forum: General Windows Vista Discussion
    Replies:
    0
    Views:
    996
    Art Bunch
    Jul 9, 2016
Loading...