FIX: Issuing FONTMETRIC() Repeatedly Causes ICE/GPF

Last reviewed: October 14, 1997
Article ID: Q108823
2.50 2.50a 2.50b 2.60 WINDOWS kbprg kbfixlist kbbuglist kberrmsg

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6

SYMPTOMS

Issuing the FONTMETRIC() function repeatedly can cause a Resource Manager Internal Consistency Error, followed by a general protection (GP) fault.

CAUSE

The problem seems to be that FoxPro is not releasing GDI resources correctly. If you issue the FONTMETRIC() function in a loop and have a resource viewer available, the GDI resource is depleted between 4 and 6 bytes per iteration. In order for the depletion to occur, the font name has to be changed and at least 25 fonts have to be installed in Windows.

STATUS

Microsoft has confirmed this to be a problem in FoxPro 2.5, 2.5a, 2.5b, and 2.6 for Windows. This problem was corrected in FoxPro 2.6a for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Make sure at least 25 fonts are installed in Windows.

  2. Run the following code in a program:

          ?AFONT(fontnames)
          MAX=ALEN(fontnames)
          FOR kk=1 TO MAX
    
               WAIT WINDOW fontnames(kk) + " " + STR(kk) NOWAIT
               FOR ii=5 TO 20
                    =FONTMETRIC(02,fontnames(kk),ii,'N')
               NEXT
          NEXT
    


Additional reference words: FoxWin 2.50 2.50a 2.50b 2.60 buglist2.50
buglist2.50a
buglist2.50b buglist2.60 gpf ice errmsg err msg fixlist2.60a
KBCategory: kbprg kbfixlist kbbuglist kberrmsg
KBSubcategory: FxtoolGeneral

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 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.