FIX: Unable to View Contents of Local Arrays on Windows NT 3.5

Last reviewed: September 18, 1997
Article ID: Q128211
1.50 1.51 WINDOWS kbtool kbfixlist kbbuglist

The information in this article applies to:

  • The Visual Workbench Integrated Debugger, included with: Microsoft Visual C++ for Windows, versions 1.5, 1.51

SYMPTOMS

Using the Visual Workbench Integrated Debugger from Visual C++ version 1.5 or 1.51 under Windows NT version 3.5, you cannot view the contents of local arrays in either the Locals window or the Watch window. When the arrays are expanded, you get the following error message from the debugger:

   CXX0030 : error : expression cannot be evaluated.

The problem only occurs when Visual C++ version 1.5 or 1.51 is hosted on Windows NT version 3.5. This is not a problem if the debugger is run from Windows, Windows for Workgroups, or Windows NT version 3.1.

RESOLUTION

Use any one of the following suggestions to work around this problem:

  • Use a global array instead of a local array.

    -or-

  • Use the Windows API OutputDebugString() to dump the array contents.

    -or-

  • Run Visual C++ from Windows or Windows for Workgrounps.

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 1.52 for Windows.

MORE INFORMATION

The following sample code can be used to reproduce the problem. The sample code should be built as a QuickWin application in debug mode.

Sample Code

/* Compile options needed: /Zi
*/

#include <stdio.h>

void function()
{
   char array1[1][5] = {"test"};
}

void main()
{
   function();
}


Additional reference words: 1.50
KBCategory: kbtool kbfixlist kbbuglist
KBSubcategory: WBDebug
Keywords : kb16bitonly WBDebug kbbuglist kbfixlist kbtool
Version : 1.50 1.51
Platform : WINDOWS
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.

Last reviewed: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.