FIX: Memory Not Released in BROWSE with ON ERROR

Last reviewed: October 20, 1997
Article ID: Q113671
2.50x 2.6x | 2.5x 2.6x
WINDOWS    | MS-DOS
kbprg kberrmsg kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x
  • Microsoft FoxPro for MS-DOS, versions 2.5x, 2.6x

SYMPTOMS

Memory is not being released when a BROWSE command is combined in a program with an ON ERROR routine in effect. This behavior often results in the error message "Insufficient Memory" or a Win32S error if you are using Visual FoxPro under Windows or Windows for Workgroups.

WORKAROUND

To workaround this situation, remove the ON ERROR routine from the code.

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 Visual FoxPro 3.0 for Windows.

MORE INFORMATION

The following code reproduces the problem:

   ON ERROR ? MESSAGE()
   USE customer    && From the Tutorial directory
   DO WHILE .T.
     BROWSE FIELDS x=company, y=contact, z=ytdpurch FREEZE state NOWAIT
     ? SYS(1011)
   ENDDO

When run in the Standard (16-bit) version of FoxPro for MS-DOS, the above routine will result in an "Insufficient Memory" error message after executing approximately 10 times. In the Extended (32-bit) version, the routine executes but continues to register more and more memory handles used. In FoxPro version 2.6 for Windows, the same thing happens, but after a minute or so, a general protection (GP) fault occurs. In FoxPro version 2.5x for Windows, a "Not Enough Memory for Buffer" error message may occur instead. Both of these errors will force FoxPro to close.


Additional reference words: FoxDos FoxWin VFoxWin 2.50 2.50a 2.50b 2.60
fixlist3.00 buglist2.50 buglist2.50a buglist2.50b buglist2.60 errmsg err
msg gpf
KBCategory: kbprg kberrmsg kbfixlist kbbuglist
KBSubcategory: FxprgBrowse
Keywords : FxprgBrowse kbbuglist kberrmsg kbfixlist kbprg
Version : 2.50x 2.6x | 2.5x 2.6x
Platform : MS-DOS WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.