AccessViolationError, how to fix?
Using C# express beta 2, I'm getting an AccessViolationError on even very simple forms. It was working fine last night, now I can't get any new form to work. IE, I go to New Project, Windows Application. Add a single Label and click debug. It builds with no problem, but when it goes to debug I instantly get the exception. However, if I open a project I created last night, it works perfectly. I have restarted the IDE and restarted Windows, but it did not make any difference. Thanks for any assistance you can provide. If it will help, here is the exception detail (using copy to clipboard option): System.AccessViolationException was unhandled Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Source="Microsoft.VisualStudio.HostingProcess.Utilities" StackTrace: at Microsoft.VisualStudio.HostingProcess.VSHostInterop.SetForegroundWindow(IntPtr hWnd) at Microsoft.VisualStudio.HostingProcess.HostProc.RunParkingWindowThread() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() |
[1431 byte] By [
mhorton] at [2007-12-16]
As a last resort, I attempted to reinstall, but that failed. (message about 'problems while creating the event log name') Maybe I need to completely uninstall first, but I'm afraid to in case it still won't install.I am able to use previously saved projects and modify them completely without error. Could the template that generates the code for new projects have been corrupted? If so, how can I fix it?
Edit - Further testing results:
I get the same results with the Screen Saver, Console, and Movie projects. The only new project that will work is the Empty project, which I then add a class via the Project menu.
All project save prior to today still function.
I read in another thread, someone mentioned running setup.exe /repair. I tried that but get the same event log name error.
I did a repair installation of the "Microsoft MSDN Express Library 2005 Beta 2 - English" located in the MS VS 8 folder, did not help.
Can anyone think of anything else I can try?
Edit #2, more testing:
If I make a new Console application, make no changes, run it, I get the Exception. Then I copy all of the code, close the solution, start new Empty project, add class, paste all the code from the failing file (after deleting everything in the new class), it runs with no error. (Flashes a console for a second and exits, since there are no further instructions.) If the same code works in the new file, how can the other with the exact same code fail?
Whatever was causing the "event log name" error and preventing reinstallation has magicly gone away now. I was able to reinstall, however the issue remains.
Since nobody here knows the problem, I issued a bug report. I also noticed there is a very similar bug for J#, but it has been closed as "unable to reproduce".
Hi,
This is not what I get which seems very similar to the VS2003 property page. Perhaps it depends on the type of solution you are creating. Try a blank windows application. I get a solution property page which is completely new in look and occupies a tab like a code window does, and includes it's own tabs layed out on the left.
My version of VS2005 is 8.0.50215.44 (beta2.050215-4400).
I'm getting this error even when I try to run a blank windows application or console application project if this setting is ticked.
I haven't installed web project development tool to test that.
I can only assume that if you do not get this error running the simplest projects then you are unaffected by what I describe and you may be getting this error for a different reason.
Cheers.
J-P at 2007-9-9 >
