BUG: Creating 500 Instances of a Form Class Causes IC Error

Last reviewed: May 1, 1997
Article ID: Q135519
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a

SYMPTOMS

Attempts to create 500 instances of a form class containing a small number of controls in a FOR loop causes an "Internal Consistency Error" (ICE).

The number of instances it can instantiate from a form class before an ICE occurs depends on the amount of RAM and the operating system on your computer.

NOTE: On 16-bit operating systems, such as Windows for Workgroups 3.11, you may get the following error message instead of an ICE:

   There is not enough memory to complete this operation.

In Visual FoxPro 5.0, the message "Too Many Windows Open" appears and the program ends. FoxPro does not exit.

In Visual FoxPro 5.0a, the message "Too Many Windows Open" appears, and the program removes all the instances of the form class from the screen. FoxPro does not abnormally terminate.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

  1. Enter the following command in the Command window:

    CREATE CLASS x OF x AS FORM

  2. Add the following objects to the form:

    Text Box list box Option Group check box Spinner

  3. Press CTRL+W to save the class, and exit from the Class Designer.

  4. Enter the following command in the Command window:

    MODIFY COMMAND mul_inst.prg

  5. Type the following code into Mul_Inst.prg:

    SET CLASSLIB TO X PRIVATE i FOR i = 1 TO 500

          string = "x" + ALLTRIM(STR(i))
          &string = CREATEOBJECT('x')
          IF &string..Left = 500
    
              &string..Left = 1
          ENDIF
          &string..Left = &string..Left+3
          &string..Caption = string
          &string..Show
       NEXT i
    
    

  6. Enter the following command in the Command window:

    DO MUL_INST.PRG


Additional query words: 5.00 3.00 3.00b
Keywords : buglist3.00 buglist3.00b buglist5.00 FxprgGeneral vfoxwin vfpbug5.0a kbbuglist
Version : 3.0 3.0b 5.0 5.0a
Platform : WINDOWS
Issue type : kbbug


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