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?
Todd GerbertConnect With a Mentor IT 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.
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:
Actually, I would start with the disk check - otherwise the repair/reinstallation may well put a file back in a bad block.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.