Debuging "Hello World" crashes VS2005 VC++ Express

Hi VC++ debug experts,

Last weekend I downloaded and installed VC++ Express.

To test it, I created a CLR Consol App. The default app generated by VC++ is a "Hello World" example. I built it and ran it without any problems.

I added a breakpoint and pressed F5. => Up pops two dialogs titled “hello.exe – Program Error” saying "Can not initiate program correctly (0x80000003)….” and then an “A fatal error has occurred and debugging needs to be terminated…” dialog spawned from VC++ it self. After pressing the “OK” buttons and sending an error report to MS via the error report dialog that also spawned by VC++, the VC++ IDE shut down and is restarted.

Instead I tried creating a Win32 consol app. Again, the standard "Hello World" example but in ANSI C this time. It builds and runs OK in a DOS consol window. BUT when I press F5, the IDE goes into debug mode i.e. the two debug panels at the bottom of the windows appearing. But nothing more appends. The IDE GUI is working and I can see that the “hello.exe” process has started in the process list. When choosing “Stop Debugging”(Shift+F5) it takes ~30 sec before a dialog comes up and says it has problem stopping debug normally (or something like that) with a “Stop Now” button. After pressing that it takes again ~30 sec before the IDE goes back to “programming mode”.

 I assumed it was a problem with the installation so I followed Aaron Stebner's four step program for solving installation problems. (http://blogs.msdn.com/astebner/archive/2005/10/27/485987.aspx)

But it did not help me. I even ran step #1 + #3 + #4 and double checked with the uninstallation tools that the computer was "clean" before rebooting and installing VC++ Express again.

 At first, the vs_beta uninstallation tool, reported an error during the uninstalling so I manually uninstalled everything I could think of that was left related to this (.NET Framework 1.1 and 2, MSDN, Platform SDK etc.) After this I ran the uninstall tool again and it did not detect any software needed to be uninstalled. I do not know if this is significant but I through the info in anyway.

After doing all this, I still can not debug a simple “Hello World” piece of code.

There are some registry entries and files that I am suspicions about e.g. vs7jit.exe in ...\Microsift Shared\VS7Debug directory. Can I have some old stuff causing the problem

Does anyone know of anything like "the Hammer" mentioned in Aarons's blog page but for previous versions of Visual Studio.

I have not, at least to my knowledge, had any other version of Visual Studio installed on this machine but I have been doing some beta testing on it. So it might be a conflict between an old debugger setting and the new VC++ Express

I have also had some other development tools installed on this machine like ATMEL microcontroller AVR Tool 4, WINAVR and GNU CC and MATLAB. But I have now uninstalled all of them but nothing seems to help.

Does anyone have an idea what to do next, short of “format C:” and reinstalling XP

Thanks,
/Per



Answer this question

Debuging "Hello World" crashes VS2005 VC++ Express

  • Harshvardhan Kharche

    Hi again,

    I have found a blog from Min Kwan Park (http://blogs.msdn.com/mkpark/articles/86872.aspx) describing issues with the VS7.X debugger.

    He describes a case debugging on a web server were one gets a “
    0x8013134b” error code in the output window.

    I get this error code from VS2005 VC++ Express !!

    Please see screen dumps showing my error messages here (http://www.xn--brms-6qa.se/junk/Debug_crash1.png & http://www.xn--brms-6qa.se/junk/Debug_crash2.png)

    Min Kwan Park says:

    Case 3: if you see “0x8013134b” error code on output window, you may have two different versions of CLRs. In that case, you need to register “aspnet_isap.dll” from the CLR which is matched your VS version.

    There is one problem for me.  The file "aspnet_isap.dll" does not exist at all on my system and I am not doing web server debugging.

    What is the equivalent to this file for VS2005 VC++ Express and is it relevant on non web server debugging

    Thanks,
    /Per


  • PrestonJ

    Did you try setting the _NT_SYMBOL_PATH environment variable

  • amberusa

    Yes, I did see your post and I checked if there were any network traffic. But there were non at least not during the first 2-3 mintues. I have also left the IDE hanging for one hour or two but it does not return to "life" during that time.

    A few days ago I downloaded C# Express to see if that worked on my machine, but it does not. The IDE hangs if Icreate a new project. It looks like the project/solution is created but then it stops The IDE says "Create Consol Application Project ... succeeded" at the status line at the bottom of the IDE window. But when I try to edit the code it is dead.

    Any more ideas

    Thanks,
    /Per

  • RZanghi

    Did you check out: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=242672&SiteID=1
    If your session is hanging rather than crashed, that may be your problem.

  • jboss

    I did not set any env. variable.

    But the problem is finaly solved for me. This is what I did.
    1. I followed Aaron Stebner's four step uninstall program  (http://blogs.msdn.com/astebner/archive/2005/10/27/485987.aspx) all four steps.  Step #1 reported that it was unable to remove some components. But #3 and 4 worked.
    2. Run Register Mechanic 5.1 and let it fix all errors and warnings. I had like 768 erros/warnings after the first scan.
    3. After the registry fix, I got errors after the reboot indicating something was wrong with .NET Framework 1.1
    4. Visited Windows Update and and reintalled .NET Framework 1.1 SP1
    5. Reboot, after this reboot non of my Start Up programs like Firewall GUI, BOINC and other Tray Icons and services started.
    6. Reboot agian. Now the startup was normal everything looked OK.
    7. Download C# Express install app again and installed C# Express.
    Now it works !!!

    Some evil code had probably meesed up my registry. And the uninstall and clean up steps from Aaron Stebner did not detect that.

    Have fun!
    /Per

  • Debuging "Hello World" crashes VS2005 VC++ Express