PAINT with Far Strings Hangs If Less Than 40K Far Memory (71789)






This article was previously published under Q71789

SYMPTOMS

The PAINT statement may hang or give a "No Resume" error when less than approximately 40000 bytes of memory are available and when the program was compiled using far strings (BC /Fs).

WORKAROUND

To work around this problem, ensure that over 40000 bytes of memory are available, or do not use far strings. This problem occurs only in compiled .EXE programs, and does not occur in the QBX.EXE environment.

STATUS

Microsoft has confirmed this to be a bug in Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The following code sample reproduces the problem when you compile and link as follows:
   BC /Fs paint;
   LINK paint;
				

Code Sample: PAINT.BAS

SCREEN 9
i = FRE(-1)
PRINT i
i = SETMEM(-(i - 30000))      'Deallocate all but 30000 bytes
PRINT FRE(-1)

LINE (50, 50)-(200, 200), , B
PAINT (100,100)
SLEEP
				

Modification Type: Minor Last Reviewed: 1/9/2003
Keywords: KB71789