Microsoft KB Archive/41041

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


QB.EXE 4.50 Instant Watch... "STRING SPACE CORRUPT" or Hang

Article ID: 41041

Article Last Modified on 11/21/2006

This article was previously published under Q41041

SYMPTOMS

The QuickBasic Version 4.50 editor can hang or give a "String Space Corrupt" error if you add an Instant Watch... (from the Debug menu) for a long variable-length string while single stepping or during a program BREAK.

STATUS

Microsoft has confirmed this to be a bug in Version 4.50. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

The problem only occurs if you set the Instant Watch... after you single-step (F8) or press CTRL+BREAK or STOP the program in the middle.

To work around the problem, choose the Restart option from the Run menu before adding an Instant Watch... for a variable-length string, or add all needed Instant Watch... variables before running the program.

MORE INFORMATION

Below are two examples displaying the problem.

The following steps duplicate the problem (Example 1):

  1. Type the following program in the QB.EXE Version 4.50 editor:

       a$=STRING$(800,65)
       STOP
                            
  2. Run the program. (Or press F8 twice to single-step to the STOP statement.)
  3. Move the cursor to the a$ variable.
  4. Select Instant Watch... from the Debug menu (or press SHIFT+F9).
  5. A dialog box appears but the computer is now hung. (The dialog box displays the string's name, its contents, a CANCEL button, and a HELP button.) You must reboot the computer.

The following steps duplicate the problem (Example 2):

  1. Type the following program in the QB.EXE Version 4.50 editor:

       A$=STRING$(190,"X")
       PRINT A$
       DO : LOOP
                            
  2. Run the program.
  3. Press CTRL+BREAK to abort the program.
  4. Move the cursor to the A$ variable.
  5. Select Instant Watch... from the Debug menu (or press SHIFT+F9).
  6. Select the Add Watch button.
  7. Now attempts to Start, Continue, or add another Watch variable can hang the computer, or fail with a "String Space Corrupt" error, which often dumps control out of the editor back to DOS.

The problem does not occur in the above examples if you set the Instant Watch... variable BEFORE running the program or BEFORE pressing CTRL+BREAK or AFTER choosing the Restart option.


Additional query words: QuickBas buglist4.50

Keywords: KB41041