Microsoft KB Archive/172892

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

Article ID: 172892

Article Last Modified on 11/18/2003

-

APPLIES TO

 The Integrated Debugger, when used with:  Microsoft Visual C++ 5.0 Enterprise Edition

 Microsoft Visual C++ 5.0 Professional Edition 

-



This article was previously published under Q172892



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.

<div class="status_section">

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.

<div class="moreinformation_section">

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

Steps to Reproduce Behavior
<ol> Create a simple "Hello World" console application project with the name Hello.</li> On the Project menu, click Settings, and then click the C++ tab.</li>  In the Project Options dialog box, look for the /Fd option and change the following

<pre class="fixed_text">/Fd"Debug/" to the following:

<pre class="fixed_text">/Fd"Debug/Hello.pdb" </li> Build the project.</li> Click Debug, click Stepinto, and then MSDEV will crash.</li> On the Project menu, click Settings, and then click the Link tab.</li> Select the Debug category, and clear the Separate Types check box.</li> Rebuild all and try to debug. A crash will not occur.</li></ol>

Additional query words: access violation AV crash GPF IPF fault

Keywords: kbbug kbfix kbide kbvc600fix kbdebug KB172892

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.