FIX: Insufficient Stack Space Hangs or Terminates FoxPro

ID: Q120179


The information in this article applies to:


SYMPTOMS

If FoxPro runs too low on stack space to display the "Insufficient Stack Space" error message, it may hang or quit, displaying one of the following error messages:

FoxPro for Windows
------------------
Application Error. FOXPROW caused a Stack Fault in module <unknown> FOXPROW will close.
FoxPro for MS-DOS
-----------------
Memory manager internal consistency error.
FoxPro for Macintosh
--------------------
- The application "unknown" has unexpectedly quit, because an error of type 1 occurred.
-or-
- Internal Consistency Error.
-or-
- <Picture of a Bomb> Sorry, a system error occurred "Microsoft FoxPro" bad F-Line instruction


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in FoxPro 2.6a for Windows, FoxPro 2.6a for MS-DOS, and FoxPro 2.6a for Macintosh.


MORE INFORMATION

In FoxPro 2.6a, the code shown below causes a special "Insufficient stack space" error message to be displayed. This special error message is displayed only when there is isn't sufficient stack space to display the normal "Insufficient stack space" error message.

Instead of containing Cancel, Suspend, and Ignore buttons, this special error message only contains an OK button in FoxPro 2.6a for Windows and FoxPro 2.6a for Macintosh. In FoxPro 2.6a for MS-DOS, it only contains a Cancel button.

The SHOW GETS statement in the following code is called recursively, depleting all stack space, which causes the "Insufficient stack space" error message.

NOTE: The following code runs successfully if the SHOW GETS statement, which is unneeded, is removed.

Steps to Reproduce Problem

NOTE: FoxPro for MS-DOS and FoxPro for Macintosh do not usually hang or crash the first time this code is run. This code usually must be run several times, with the Suspend or Cancel buttons sometimes being chosen, before the stack space is depleted, which causes FoxPro to crash.

Create and run the following program in FoxPro:

   CREATE TABLE test (one C (30))
   INSERT INTO test (one) VALUES ("Los Angeles")
   INSERT INTO test (one) VALUES ("San Diego")
   INSERT INTO test (one) VALUES ("New York")
   INSERT INTO test (one) VALUES ("Bellevue")
   INSERT INTO test (one) VALUES ("Seattle")
   INSERT INTO test (one) VALUES ("Redmond")
   INSERT INTO test (one) VALUES ("Detroit")
   INSERT INTO test (one) VALUES ("Miami")
   INSERT INTO test (one) VALUES ("San Francisco")
   INSERT INTO test (one) VALUES ("Houston")
   INSERT INTO test (one) VALUES ("Minneapolis")
   INSERT INTO test (one) VALUES ("Boston")
   INSERT INTO test (one) VALUES ("Kansas City")
   INSERT INTO test (one) VALUES ("West Palm Beach")

   DEFINE POPUP new ;
     PROMPT FIELD display() ;
     SCROLL

   lchoice  = 1
   @ 1.000,2.571 GET lchoice ;
     PICTURE "@&N" ;
     POPUP new ;
     SIZE 9.000,83.857 ;
     FONT "MS Sans Serif", 8

   READ

   RELEASE POPUPS new

   CLOSE ALL

   PROCEDURE DISPLAY
   rtxt = one
   SHOW GETS
   RETURN rtxt 

Additional query words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b 2.50c 2.60a buglist2.50 buglist2.50a buglist2.50b buglist2.50c buglist2.60 fixlist2.60a errmsg err msg gpf gp general protection fault hang hung crash freeze ice lock up exit terminate


Keywords          : kberrmsg FxtoolGeneral 
Version           : 2.5x 2.60 | 2.5x 2.60 | 2.5x 2.6
Platform          : MACINTOSH MS-DOS WINDOWS 
Issue type        : 

Last Reviewed: July 29, 1999