BUG: Compiled Error 57 68020/68881 Option STRING$(32767,32) (71240)



The information in this article applies to:

  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0
  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0a
  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0b

This article was previously published under Q71240

SYMPTOMS

Below is an example of a problem using the STRING$(32767,32) function when compiled with the Generate 68020 Code or Generate 68881 Code option.

The following code usually (incorrectly) gives error 57 ("Device I/O Error") at run time on Apple System version 6.05. Sometimes Error 5 ("Invalid Function Call") incorrectly occurs when the program tries to print the FRE function after the string assignment a$ = STRING$(32767,32). In other, different combinations of QuickBasic versions, compiler options, and System versions, wrong screen output, System Errors, or hanging may occur.

The program is compiled with all compiler options including "Use default menus" and "Process events." The symptoms of this problem depend upon the version of the Apple System software.

This problem occurs in Microsoft QuickBasic versions 1.00, 1.00a, and 1.00b for Macintosh Systems. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

When you compile without the Generate 68020 Code or Generate 68881 Code options, or if you changed the string assignment to a$ = STRING$(32766,32), no problem occurs.

MORE INFORMATION

If compiled using QuickBasic version 1.00b running on Apple System version 6.05, you will get either error 57 or error 5.

When compiled with QuickBasic version 1.00b using System version 6.04 (other System versions not tested), the display of output is corrupt:

Instead of
   data: 74096   stack: 12212  string: 78820
   data: 74096   stack: 12212  string: xxxxx
				
you get the following:
   data: 74096   stack: 12212  string: 78820
   data: data:
 
    74096    74096
 
   stack: stack:
 
    12212    12212
 
   string: string:  78820
 
    78820
				
When tested with System version 6.04 using QuickBasic version 1.00, a system bomb ID=3 occurs when the program is compiled with either the 68020 or 68881 options.

Code Example

       WINDOW 1,"",(10,25)-(500,500)
       PRINT "data: ";FRE(-1);"stack: ";FRE(-2);"string: ";FRE("")
       a$ = STRING$(32767,32)
       PRINT "data: ";FRE(-1);"stack: ";FRE(-2);"string: ";FRE("")
       INPUT x   'for a pause
       WINDOW CLOSE 1
       END
				

Modification Type:MajorLast Reviewed:10/23/2003
Keywords:kbbug KB71240