BUG: CopyFile Fails w/ System Err 3 w/ Binary Mac QB 1.0b (76667)






This article was previously published under Q76667

SYMPTOMS

The following sample program, when compiled under the binary version of QuickBasic version 1.0b, will fail with a system bomb 3 ("illegal instruction") when launched:
   INPUT "Name of source file: ", f1$
   INPUT "Name of destination file ", f2$
   CopyFile f1$, f2$      'Program fails on this statement.
				
This problem only occurs for programs compiled using the binary version of QuickBasic version 1.0b. The problem does not occur when the program is run in the development environment of QuickBasic version 1.0, 1.0a or 1.0b for either the binary or decimal version. The problem does not occur when the program is compiled with the decimal version of QuickBasic version 1.0, 1.0a or 1.0b.

Microsoft has confirmed this to be a bug with Microsoft QuickBasic version 1.0b for the Macintosh . We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

A workaround for the problem is to use ResEdit to copy the CopyFile MBLC routine from the decimal version of QuickBasic to the binary version. The program can be recompiled with the binary version and when run, the problem will no longer occur. Below are the steps to copy the CopyFile MBLC routine from the decimal version to the binary version:

  1. Launch ResEdit
  2. From the file list box, select the folder containing the decimal version of QuickBasic.
  3. Double-click on QuickBasic within the list to bring up the resource list box.
  4. From the resource list box, double-click on MBLC.
  5. Search for CopyFile ID=1200 within the list.
  6. Highlight the line including "CopyFile ID=1200".
  7. From the Edit menu, choose Copy.
  8. Close the list box containing the list of MBLC routines and associated ID numbers.
  9. Close the resource list box.
  10. Double-click on the binary version of QuickBasic within the list box to bring up the resource list box.
  11. From the resource list box, double-click on MBLC to bring up the list box containing a list of the MBLC routines and associated ID numbers.
  12. From the Edit menu, choose Paste. The CopyFile routine should appear at the top of the list (out of alphabetical order), indicating that it was successfully copied.
  13. Close the list box.
  14. Close the resource list box.
  15. From the "Save 'Microsoft QuickBasic (b)' before closing?" dialog box, select Yes to save the changes.
  16. From the File menu, choose Quit to exit ResEdit.
Recompile the program using the binary version of QuickBasic. When the program is launched, the CopyFile routine should work as expected.

Modification Type: Minor Last Reviewed: 1/9/2003
Keywords: kbbug KB76667