Microsoft KB Archive/194886

= BUG: Repeatedly Calling Genxtab Can Cause Memory Leak =

Article ID: 194886

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q194886



SYMPTOMS
Repeatedly calling Genxtab.prg within a program causes Visual FoxPro 3.0x and 5.0x to lose one memory handle in each iteration of the loop after the first pass. This problem does not occur in Visual FoxPro 6.0.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior
  Create a program that contains the following code: CLEAR SET SAFETY OFF FOR i = 1 TO 200 ? "Run Number: " + STR(i), SYS(1016), SYS(1011) SELECT to_country,ship_via,order_net FROM orders ; ORDER BY to_country, ship_via ; GROUP BY to_country, ship_via INTO TABLE bob DO (_GENXTAB) WITH ('bob1'),, , , , , ,.T.     NEXT SET SAFETY ON                        Run the program and notice the number of memory handles, the last number on each line, increase by one with each iteration after the first pass. Eventually, the system may report a memory error such as:

Windows 95

VFP caused an invalid page fault in module KERNEL32.DLL at.

-or-

Windows NT 4.0

vfp.exe

Exception: access violation(0x0000005), Address:

However, to experience the system error message, you may need to increase the number of iterations in the FOR...NEXT loop.

Keywords: kbbug kbmisctools kbxbase KB194886

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.