Q172892: FIX: MSDEV Crashes If Same PDB Name Used for Compiler and Linker
Article: Q172892
Product(s): Microsoft C Compiler
Version(s): winnt:5.0
Operating System(s):
Keyword(s): kbDebug kbide kbVC500bug kbVC600fix
Last Modified: 06-MAY-2001
-------------------------------------------------------------------------------
The information in this article applies to:
- The Integrated Debugger, used with:
- Microsoft Visual C++, 32-bit Enterprise Edition, version 5.0
- Microsoft Visual C++, 32-bit Professional Edition, 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
Technology : kbVCsearch kbAudDeveloper kbIntegratedDebugger
Version : winnt:5.0
Issue type : kbbug
Solution Type : kbfix
=============================================================================
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.