VHanded
VHanded

Reputation: 2089

System.OutOfMemoryException and a few exceptions happen during application run, Visual Studio 2010 WPF C#

I just discovered this problem today, and I had no idea what caused this problem. My project had been developed for few months.

I have a project(solution), with several projects in there, it works well if I write and debug, by pressing F5.

The problem occur is when I press Ctrl+F5 (to skip debug mode), or run directly from double click the exe, it crashed. The errors dialogs that pop up every times are different, but OutOfMemoryException is the most frequent one.

  1. I had checked to make sure all my projects are .Net 3.5
  2. I put a MessageBox.Show("something") at the beginning of my main project constructor, but it never reach.
  3. I use some registry cleaner to clean/fix my registry, scan for viruses.
  4. I had try to read the meaning of each error and exception, but still no clue why it happen.

These are a series of screenshots if I press Ctrl + F5. (FutureGenerator is some random name I gave to my project.)

One of the error(note that my application is .Net 3.5, why it loads 4.0 assembly?)

Stop working window

After I click OK from the first screen shot

in visual studio, unexpected exception unhandled

Series of screenshot if I run the app from my debug folder, FutureGenerator.exe

OutOfMemoryException

stop working

Visual Studio OutOfMemoryException window

Detail View, which is not detail at all.

I suspect this is caused by framework crashed during Windows Update, but I removed those update that I performed recently, still same. The exe file works on other non development PC, but I don't want to reformat my PC or reinstall my VS, yet, because it's a painful process.

Any idea, anyone?? Million thanks.

Upvotes: 1

Views: 762

Answers (2)

VHanded
VHanded

Reputation: 2089

I found the problem. It's actually because I added FutureGenerator.exe into Application Verifier by Microsoft. The verifier only support debugging testing.

After I removed FutureGenerator.exe from the Application Verifier, everything's ok.

Upvotes: 1

Henk Holterman
Henk Holterman

Reputation: 273244

You mention v3.5 but the very first screenshot is about v4.

Try repairing your Framework 4 and/or VS2010

Upvotes: 1

Related Questions