Thursday, June 25, 2009

Visual Studio 2008 IDE memory leak - "Enable error correction suggestions" causes sluggish behavior, freezing, and crashes

Have been experiencing slowdowns, freezing and crashing of the visual basic IDE on a consistent basis for a few days.

I can see memory leaking in megabyte+ chunks within Task Manager each time I type anything in the IDE on a VB code page. With just one file open I can keep the memory growing indefinitely in ~10MB increments by adding any text, erasing it, saving, and then repeating.

The additional memory is not fully recovered so I eventually have to restart the IDE to avoid a crash. I've seen it climb up to 1.4 GB (out of 3 GB). This was not a sustainable way to work.

Almost sure this behavior started after June 2009 windows hotfixes were applied. I had been working primarily in Java/Eclipse the last few months, but intermittenly spent time in the VS2008 IDE producing hotfixes and had not experienced this instability before.

Tried removing Office 2007 (trial) since that was mentioned as a possible issue in a couple of places, but no change. Tried removing MS Works which was recently installed as a "security hotfix" - only to find that is a whole can of worms by itself.

WORKAROUND: What finally seems to have stabilized the IDE is de-selecting the "Enable error correction suggestions" option.

HOW TO: to de-select this option go to Tools, Options, Text Editor, Basic, VB Specific - uncheck the box and hit OK.

If anyone has any better suggestions please feel free to post in comments.