FIX: Insufficient Memory After Displaying List Boxes

ID: Q115145

2.50b MACINTOSH kbprg kbfixlist kbbuglist kberrmsg

The information in this article applies to:

SYMPTOMS

Displaying list boxes multiple times eventually depletes all FoxPro memory. You must quit, then restart FoxPro in order to free all memory available to FoxPro.

Some of the symptoms of insufficient memory are:

STATUS

Microsoft has confirmed this to be a problem in FoxPro 2.5b for Macintosh. This problem was corrected in FoxPro 2.5c for Macintosh.

MORE INFORMATION

The memory used by objects such as user-defined windows, menu bars, popups, memory variables, and arrays is normally released when a low-memory situation occurs. However, the memory for list boxes (defined by the DEFINE POPUP statement) is not released in FoxPro 2.5b. This may eventually cause a FoxPro or system error due to insufficient memory.

Steps to Reproduce Problem

1. Using Finder, select the Microsoft FoxPro application icon in the

   Microsoft FoxPro folder. From the File menu, choose Get Info.

2. In the lower-right corner of the Microsoft FoxPro Info dialog box, under
   Memory Requirements, type "2000" (without the quotation marks) in the
   Minimum Size and Preferred Size text boxes. Close the dialog box.

3. Start FoxPro.

4. Create a program called TESTPOP.PRG containing the following code:

      CREATE TABLE test (charfld C(10))
      INSERT INTO test (charfld) VALUES ('ONE')
      INSERT INTO test (charfld) VALUES ('TWO')
      INSERT INTO test (charfld) VALUES ('THREE')

      DEFINE POPUP testpop PROMPT FIELD test.charfld SCROLL

      FOR i = 1 TO 200
         SHOW POPUP testpop
      ENDFOR

      ACTIVATE WINDOW COMMAND

5. In the Command window, type "DO testpop" (without the quotation marks).

The system will slow down, displaying the watch mouse pointer. The following error message may eventually display:

   The application "unknown" has unexpectedly quit, because an error of
   type 1 occurred.

NOTE: Be sure to change the Memory Requirements in Finder's Microsoft FoxPro Info dialog box back to their original settings--usually 2600 for Minimum Size, and 5000 for Preferred Size.

Additional reference words: FoxMac 2.50b buglist2.50b fixlist2.50c errmsg err msg ice KBCategory: kbprg kbfixlist kbbuglist kberrmsg KBSubcategory: Solution Type : kbfix

Last Reviewed: October 20, 1997