Macintosh System Error, Hang/No Output; "Use Default Window" (33054)






This article was previously published under Q33054

SUMMARY

If a program is compiled in Macintosh QuickBASIC without the "Use Default Window" option selected from the Options... item on the Run menu, and the program does not create its own window, no output goes to the screen when the program is run.

Warning: The BEEP or INPUT statement, many ROM calls, and all types of graphics statements may result in one of the following symptoms if invoked before you have created a window in a compiled QuickBASIC program:

  1. System hang (which requires you to reboot the Macintosh)
  2. System Error (bomb), such as ID=25, "Out of Heap Space" (which usually requires you to reboot the Macintosh)
  3. Other unpredictable results
If you need to use one of these statements, you must either compile with the "Use Default Window" option selected or make the program create its own window using the WINDOW statement before sending output.

The ability to turn off the default window is provided in Macintosh QuickBASIC to suppress the brief flashing appearance of the Untitled output window at the beginning of compiled programs that define their own windows with the WINDOW statement. This feature helps software developers improve the polished appearance of programs.

MORE INFORMATION

The following steps demonstrate this subject:

  1. Type the following program into QuickBASIC Version 1.00:

    INPUT X

  2. Save the program.
  3. Turn off "Use Default Window" in the Options... in the Run menu.
  4. Select Compile from the Run menu (or press COMMAND+K) to compile the program.
  5. When you run the compiled program you may get System Error (bomb) ID=25 (Out of Heap space).
To avoid this problem, compile with the "Use Default Window" option or define your own window in the program with the WINDOW statement. For example, the following program works correctly whether or not you compile with the "Use Default Window" option:
   WINDOW 1,"This goes in title bar",(50,110)-(430,240),1
   INPUT X
				
The problem does not occur in the QuickBASIC interpreter because the interpreter uses its own output window, if one is not specified in the program.

Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: KB33054