BUG: Syntax Err w/ UBOUND Causes Hang w/ R6000 Stack Overflow (72716)



The information in this article applies to:

  • Microsoft Visual Basic for MS-DOS
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1

This article was previously published under Q72716

SYMPTOMS

When compiling with BC.EXE from outside the VBDOS.EXE or QBX.EXE environment, a syntax error within the UBOUND statement can cause the compiler to continuously display the following error message:
Run-time error R6000
-stack overflow
Your computer may hang (stop responding to input) unless you press CTRL+BREAK immediately.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Note that this is not a problem with Microsoft QuickBasic version 4.5 for MS-DOS.

MORE INFORMATION

The following code example demonstrates the problem:
'test.bas
DECLARE SUB mysub ()
TYPE mytype
 a AS STRING * 5
END TYPE
DIM bar(10) AS mytype
COMMON SHARED bar() AS mytype

SUB mysub
FOR i% = 0 TO UBOUND(bar())   ' <-- Syntax error here.
PRINT i%                      ' Remove the () after bar
NEXT                          ' to correct the error.
END SUB
				
When compiled from the BC command line (BC test;), the BC.EXE compiler will correctly identify the syntax error but then continuously display the stack overflow error. The BC.EXE compiler included with Microsoft Visual Basic for MS-DOS displays the following two error messages and then ends:
Run-time error R6000 -stack overflow
Run-time error R6001 -Null Pointer Assignment

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:kbbug KB72716