Microsoft KB Archive/41041

= QB.EXE 4.50 Instant Watch... &quot;STRING SPACE CORRUPT&quot; 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 &quot;String Space Corrupt&quot; 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):

  Type the following program in the QB.EXE Version 4.50 editor: a$=STRING$(800,65) STOP  Run the program. (Or press F8 twice to single-step to the STOP statement.) Move the cursor to the a$ variable. Select Instant Watch... from the Debug menu (or press SHIFT+F9). 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):

  Type the following program in the QB.EXE Version 4.50 editor: A$=STRING$(190,&quot;X&quot;) PRINT A$  DO : LOOP </li> Run the program.</li> Press CTRL+BREAK to abort the program.</li> Move the cursor to the A$ variable.</li> Select Instant Watch... from the Debug menu (or press SHIFT+F9).</li> Select the Add Watch button.</li> Now attempts to Start, Continue, or add another Watch variable can hang the computer, or fail with a &quot;String Space Corrupt&quot; error, which often dumps control out of the editor back to DOS.</li></ol>

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

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.