Microsoft KB Archive/108823

From BetaArchive Wiki

FIX: Issuing FONTMETRIC() Repeatedly Causes ICE/GPF

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


Last Reviewed: October 14, 1997
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.