FIX: __vfptr Elements Are Not Properly Displayed in Debugger

ID: Q150003


The information in this article applies to:
  • The Integrated Debugger, used with:
    • Microsoft Visual C++ 32-bit Edition, versions 4.0, 4.1, 4.2


SYMPTOMS

When you view the theApp variable in an AppWizard-generated MFC application, the element values of __vfptr are not properly displayed in the debugger. For an example, please see the "More Information" section of this article.


RESOLUTION

Drag the address of __vfptr into the memory window, view the data in long-hex format, and notice that the addresses to which the __vfptr variable points appear.


STATUS

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


MORE INFORMATION

Example

  1. Create a default AppWizard MFC application. In the InitInstance(), view the theApp variable in the watch window.


  2. Expand the theApp variable to view the following tree structure:
    
       theApp
        CWinApp
         CWinThread
          CCmdTarget
           CObject
             __vfptr = 0x00405118   // This is correct 


Under Windows NT:

          [0] CXX0030: Error: expression cannot be evaluated
          [1] CXX0030: Error: expression cannot be evaluated
          [2] CXX0030: Error: expression cannot be evaluated
          [3] CXX0030: Error: expression cannot be evaluated
          [4] CXX0030: Error: expression cannot be evaluated 
Under Windows 95 (All values are incorrect):

          [0] 0xf000e681
          [1] 0xf000ff47
          [2] 0xf000ff47
          [3] 0xf000ff47
          [4] 0xf000ff47 

Additional query words: kbVC400bug

Keywords : kbDebug kbide kbVC500fix
Version : winnt:
Platform : winnt
Issue type : kbbug


Last Reviewed: January 31, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.