title: Conhost error 0xc0000005 causes application launch failed
body: <p>I have 2 .bat files:</p>
  
  <p>A.bat:</p>
  
  <pre><code>start myprogram.exe
  start B.bat
  </code></pre>
  
  <p>B.bat</p>
  
  <pre><code>&lt;log current time to Windows Event Viewer for debugging&gt;
  javaw (or java) myjava
  </code></pre>
  
  <p><code>A.bat</code> is executed on Windows 7 (32 bit) start up which is subject to stress test (the machine is restarted every 10 minutes). The restart action is done by <code>myjava</code>. At the beginning of <code>myjava</code> I log current time into a file for debugging purpose.</p>
  
  <p>The problem is, sometimes (after 50-100 restarts) <code>myjava</code> is not executed but B.bat is executed (I see the first log in Event Viewer but not the second log from <code>myjava</code>). This also happens if <code>myjava</code> is replaced by simple C++ program (so it's not JVM issue).</p>
  
  <p>The only common thing is a conhost 0xc0000005 error log, right after my first log in Event Viewer:</p>
  
  <pre><code>Fauilting application name: conhost.exe, version: 6.1.7601.18229, time stamp: 0x51fb02e5
  Fauilting module name: conhost.exe, version: 6.1.7601.18229, time stamp: 0x51fb02e5
  Exception code: 0xc0000005
  Fault offset: 0x00001632
  Faulting process id: 0xdb0
  Faulting application start time: 0x01cfb84ffc3da56f
  Faulting application path: C:\Windows\system32\conhost.exe
  Faulting module path: C:\Windows\system32\conhost.exe
  Report Id: 3be0cf06-2443-11e4-bf16-00e02711104e
  </code></pre>
  
  <p>There is possibility that this is the fault of <code>myprogram.exe</code> but I have no visibility on what it does. This also does NOT occur in Windows XP.</p>