KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q47565: Using Named COMMON /SYMBOL/ May Cause "String Space Corrupt"

Article: Q47565
Product(s): See article
Version(s): 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist4.00 buglist4.00b buglist4.50 SR# S890710-48 | mspl13_basic
Last Modified: 26-FEB-1990

When running a program from the QuickBASIC QB.EXE environment Version
4.50, 4.00b, or 4.00, a "string space corrupt" error message can
occur, dumping you back to DOS, when all of the following conditions
occur together:

1. The program contains a named COMMON block with the name of
   /SYMBOL/.

2. The named COMMON block contains a variable-length STRING.

3. Any Quick library has been loaded.

Microsoft has confirmed this to be a problem in QuickBASIC Versions
4.00, 4.00b, and 4.50. We are researching this problem and will
post new information here as it becomes available.

This problem does not occur in the Microsoft BASIC Professional
Development System (PDS) Version 7.00 QBX.EXE environment.

This problem can be corrected by any of the following methods:

1. Rename the COMMON block to anything but /SYMBOL/.

2. Remove all variable-length STRINGs from the COMMON block.

3. Changed the variable-length STRINGs to fixed-length STRINGs.

4. Invoke QuickBASIC without loading a Quick library.

Code Example
------------

The following sample program generates a "String space corrupt" error
message and then drops you out to DOS if run from within the
environment with a Quick library loaded:

   COMMON /SYMBOL/ Astring$
   Print "Hello"
   END

Additional reference word: B_BasicCom

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.