title: "An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll"
body: <pre><code>DateTime tThen = DateTime.Now;
  do
  {
      Application.DoEvents();
  } while (!cefGlueBrowserForm.Done || tThen.AddSeconds(15) &gt; DateTime.Now);
  
  string htmlSource = cefGlueBrowserForm.DocumentDomHtml;
  propertyBag.GetResponse = () =&gt; new MemoryStream(Encoding.UTF8.GetBytes(htmlSource));
  cefGlueBrowserForm.Dispose();
  </code></pre>
  
  <p>After few hours I get in line</p>
  
  <pre><code>while (!cefGlueBrowserForm.Done || tThen.AddSeconds(15) &gt; DateTime.Now);
  </code></pre>
  
  <p>exception of</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll</p>
  </blockquote>
  
  <p>Here is description of error:
  <a href="http://msdn.microsoft.com/en-us/library/w6sxk224%28v=vs.90%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/w6sxk224%28v=vs.90%29.aspx</a></p>
  
  <p>Make sure you do not have an infinite loop or infinite recursion.</p>
  
  <blockquote>
    <p>Too many method calls is often indicative of a very deep or unbounded recursion.</p>
  </blockquote>
  
  <p>so what Can I do? I need to wait until some code in cefGlueBrowserForm is finished or time is reached. But why then error, I have time check...</p>