BUG: Watch on Struct Member Gives CXX0030 if Offset >= 32K
Q117150
1.00 1.50
WINDOWS
kbtool kbbuglist
----------------------------------------------------------------------
The information in this article applies to:
- The Visual Workbench Integrated Debugger included with:
Microsoft Visual C++ for Windows, versions 1.0 and 1.5
----------------------------------------------------------------------
SYMPTOMS
========
If a C++ application has a global structure containing member arrays whose
total size exceeds 32K, expanding a member of the structure in the watch
window will cause a CXX0030 error message, "expression not evaluatable", to
display if the starting address of the member is over 0x7FFF from the
beginning of the structure. This happens both in CodeView for Windows and
the Visual Workbench integrated debugger.
CodeView for MS-DOS behaves a little differently; while the structure
member can be expanded, the values displayed are incorrect.
NOTE: This problem does not occur for C applications.
STATUS
======
Microsoft has confirmed this to be a bug with Visual C++ for Windows,
versions 1.0 and 1.5. We are researching this problem and will post new
information here in the Microsoft Knowledge Base as it becomes available.
This is not a problem in Visual C++ 32-bit Edition, version 1.0.
MORE INFORMATION
================
Go through the following steps to reproduce the problem, using the sample
code below:
1. Build a debug version of the program.
2. Run it past the initialization of the structure "teststruct".
3. Add a watch on teststruct.
4. Expand teststruct and then "teststruct.c".
Sample Code
-----------
/* Compile options needed: /Zi /Od /Tp
*/
struct test
{
char a[16384];
char b[16384]; // If changed to b[16383],
char c[10000]; // expanding c works correctly.
} teststruct;
void main( void )
{
teststruct.c[0] = 'A';
} // Break here, set a watch on teststruct, expand c.
Additional reference words: 1.00 1.50 4.00 4.01 4.10
KBCategory: kbtool kbbuglist
KBSubcategory: WBDebug