Note that there are some explanatory texts on larger screens.

plurals
  1. POAccessViolationException (or SEHException or ExecutionEngineException) when running App from inside Visual Studio
    primarykey
    data
    text
    <p>Starting recently, I now get <code>AccessViolationException</code>s on most startups of our WinForms app from inside Visual Studio 2010, leading it to abort.</p> <p>But doing a <strong>Ctrl-F5</strong> instead of the usual <strong>F5</strong> fixes the issue for me, i.e. it's kind of the opposite of <a href="https://stackoverflow.com/questions/2679248">AccessViolationException outside Visual Studio?</a>.</p> <p>Here's an example of such an exception, but they come with various other stack traces, too, not just this one:</p> <pre><code>System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Environment.get_TickCount() at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) at System.Windows.Forms.Control.WndProc(Message&amp; m) at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m) at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) at System.Windows.Forms.Form.WndProc(Message&amp; m) at OurApp.BaseForm.WndProc(Message&amp; m) at OurApp.OtherForm.WndProc(Message&amp; m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) </code></pre> <p>Btw. starting up again I just had this exact same stack trace, but with a</p> <pre><code>System.Runtime.InteropServices.SEHException: External component has thrown an exception. </code></pre> <p>instead of the AccessViolationException. But overall, the AccessViolationExceptions are way more frequent than <code>SEHException</code>s.</p> <p><strong>Update</strong> Meanwhile, I sometimes get <code>ExecutionEngineException</code>s instead of the above.</p> <p>I'm running Windows 7 64bit (in a VirtualBox). Installing all Windows Updates, including Visual Studio 2010 SP1, just in case, did not fix the problem.</p> <p>Any ideas on what this might be or how to dig deeper into it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload