title: IE9 crashes when hiding DIVs
body: <p>NOTE: 
  Sorry, I don't yet have code to support this article (sensitive production code only). I will attempt to provide a concise working sample if time permits later. I wanted to publish this in the hopes it can offer hints to others in tracking down similar issues.</p>
  
  <h2>Using</h2>
  
  <ul>
  <li>Internet Explorer 9.  </li>
  <li>jQuery 1.9.2 and 2.0.0.  </li>
  <li>HTML5 doctype</li>
  </ul>
  
  <h2>Scenario</h2>
  
  <ul>
  <li>I have a page split into logical "screens".   </li>
  <li>Each screen is a DIV identified by class names (e.g. "formScreen", "errorScreen", "confirmationScreen").  </li>
  <li>".formScreen"'s contain form (data input) fields, and the whole page has single submit button which generates a JSON package from the form data and performs an AJAX post-back.  </li>
  <li>I fill in the form "in a certain way" (the order in which I fill in the form seems to make a difference), then submit.  </li>
  <li>After a response is received by the submit, the code updates the display.</li>
  </ul>
  
  <h2>The Problem</h2>
  
  <p>Hiding all "formScreen" DIVs after submitting causes IE9 to completely crash.</p>
  
  <p>Originally I define a formScreens variable:</p>
  
  <pre><code>var formScreens = $(".formScreens");
  </code></pre>
  
  <p>then later call:</p>
  
  <pre><code>$(formScreens).hide();  
  </code></pre>
  
  <p>which causes IE to crash.</p>
  
  <p>I also tried the following, and both options also cause the crash:  </p>
  
  <pre><code>var copyOfFormScreens = $("div.formScreen");
  
  $(copyOfFormScreens).each(function ()  
  {  
      $(this).hide();                   // Option 2: This fails too. 
      $(this).css("display", "none");   // Option 3: This fails too.  
  });
  </code></pre>
  
  <h2>IE crash error</h2>
  
  <p>The following was returned by IE when crashing:</p>
  
  <pre>
  Problem signature:
    Problem Event Name:   APPCRASH
    Application Name: IEXPLORE.EXE
    Application Version:  9.0.8112.16496
    Application Timestamp:    51a55c6d
    Fault Module Name:    MSHTML.dll
    Fault Module Version: 9.0.8112.16496
    Fault Module Timestamp:   51a55ff0
    Exception Code:   c00000fd
    Exception Offset: 0032ef01
    OS Version:   6.1.7601.2.1.0.256.48
    Locale ID:    3081
    Additional Information 1: 39a4
    Additional Information 2: 39a4d7f18c1c7c725934453009d2f1b9
    Additional Information 3: ddcf
    Additional Information 4: ddcfafd1b35f05f847ac8d3e7a7bcf12
  </pre>
  
  <p>And the following when debugging in Visual Studio:</p>
  
  <pre>
  Unhandled exception at 0x6302EF01 (mshtml.dll) in iexplore.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x02432F68).  
  Unhandled exception at 0x630A172B (mshtml.dll) in iexplore.exe: 0xC0000005: Access violation writing location 0x02430FFC.   // This error continued to show when pressing the debug "continue".
  </pre>