7 year old Visual Studio Bug... System Error &Hc0000005&

I am using VS 2008 Pro and everything was fine until all of a sudden I got the error message... "Visual Basic .NET compiler is unable to recover from the following error: System Error &Hc0000005& (Visual Basic internal compiler error)  Save your work and restart Visual Studio .NET".

Now I can't do anything without the VS crashing.  I searched Google and see this issue has been around for 7+ years since VS 2003.  

Has anyone run into this problem with VS 2008 Professional and did you find a fix?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Todd GerbertIT ConsultantCommented:
Have you tried repairing/re-installing Visual Studio?
Or starting devenv.exe with the /safemode parameter (may be a misbehaving add-in)?
handyjayAuthor Commented:
Repairing VS this morning was my plan but I think I MAY have found the issue.  I was in the middle of creating a stringbuilder object when the issue happened and I had copied some code from SQL into VS so I could build the query string using a stringbuilder.    I think VS thought the code was an attribute and since it was obviously invalid it crashed.  The code I was in the middle or rewritting from SQL to VB.NET is below.  As I was editing this line "    sb.Appendf("   (<JobNumber, int,>" , it crashed just as I typed sb.appenndf...

So if this is the reason it is a bug from Microsoft that should not happen.

I commented out the code and now it works but when I try to reproduce the issue...Of course I can not reproduce the error now!

Im glad I'm back up and running again but I hate it when I can not reproduce errors.  I would be happier if I can figure out why it happened!
Dim sb As New System.Text.StringBuilder
        sb.Append("INSERT INTO [Jason_DB].[dbo].[DataTrackerSystemTimer] ")
        sb.Append("  ([JobNumber] ")
        sb.Append("    ,[user]) ")
        sb.Append("  VALUES ")
              sb.Appendf("   (<JobNumber, int,>
                ,<user, varchar(50),>)

Open in new window

Todd GerbertIT ConsultantCommented:
I think it's more likely that you've got a bad block or two on your hard drive where some Visual Studio-related file was - or that installation of some unrelated program installed an older version of a dependant library - or there's a misbehaving Visual Studio Add-In. Also possible I suppose, but less likely, is bad RAM or a bad device driver.
Start with the repair, re-apply the latest Visual Studio service pack, and check your hard drive.
Not that all Microsoft software is 100% bug-free, but they do spend billions on testing and development - I find it unlikely that such a glaring bug would have slipped through.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Todd GerbertIT ConsultantCommented:
Actually, I would start with the disk check - otherwise the repair/reinstallation may well put a file back in a bad block.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.