FIX: MSDEV Crashes If Same PDB Name Used for Compiler and Linker

ID: Q172892


The information in this article applies to:
  • The Integrated Debugger, used with:
    • Microsoft Visual C++, 32-bit Editions, version 5.0


SYMPTOMS

When the pdb file generated by the compiler has the same name as the pdb file generated by the linker, and the /pdbtype:sept option is set, Developer Studio may crash if you select Debug.StepInto. It may also crash if you set a breakpoint and select Debug.Go.

Following are examples of possible error messages:

MSDEV caused a stack fault in module MSPDB50.DLL at 015f:1030493b.
-or-
MSDEV.EXE - Application error. The exception unknown software exception (0xc00000fd) occurred in the application at location 0x1030837b.


CAUSE

The /pdbtype:sept linker option specifies that the debug information generated by the compiler and the linker be kept in separate pdb files. Because the same pdb file name is used, the linker overwrites the pdb file generated by the compiler without copying the compiler debug info as well. When the debugger attempts to use this file it goes into infinite recursion and eventually the stack overflows and causes Developer Studio to crash.


RESOLUTION

Use one of the following workarounds:

  • Turn off /pdbtype:sept. To do this, on the Project menu, click Options, click the Link tab, select the Debug category, and clear the Separate types check box.


  • Do not use the same pdb file name for linker and compiler output.



STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual C++ version 6.0 for Windows.


MORE INFORMATION

NOTE: /pdbtype:sept is the default in a Developer Studio project.

Steps to Reproduce Behavior

  1. Create a simple "Hello World" console application project with the name Hello.


  2. On the Project menu, click Settings, and then click the C++ tab.


  3. In the Project Options dialog box, look for the /Fd option and change the following
    
    /Fd"Debug/" 
    to the following:
    
    /Fd"Debug/Hello.pdb" 


  4. Build the project.


  5. Click Debug, click Stepinto, and then MSDEV will crash.


  6. On the Project menu, click Settings, and then click the Link tab.


  7. Select the Debug category, and clear the Separate Types check box.


  8. Rebuild all and try to debug. A crash will not occur.


Additional query words: access violation AV crash GPF IPF fault

Keywords : kbDebug kbide kbVC500bug kbVC600fix
Version : winnt:5.0
Platform : winnt
Issue type : kbbug


Last Reviewed: August 3, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.