Link to home
Start Free TrialLog in
Avatar of handyjay
handyjay

asked on

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?
Avatar of Todd Gerbert
Todd Gerbert
Flag of United States of America image

Have you tried repairing/re-installing Visual Studio?
Or starting devenv.exe with the /safemode parameter (may be a misbehaving add-in)?
Avatar of handyjay
handyjay

ASKER

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

ASKER CERTIFIED SOLUTION
Avatar of Todd Gerbert
Todd Gerbert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Actually, I would start with the disk check - otherwise the repair/reinstallation may well put a file back in a bad block.