FIX: CLEAR CLASS of Objects in Containers Causes GPF

Last reviewed: December 1, 1997
Article ID: Q169364
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0

SYMPTOMS

When you issue a CLEAR CLASS command to clear a control class in a container, Visual FoxPro has a GPF (General Protection Fault) and close.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Microsoft Visual FoxPro version 5.0a for Windows.

MORE INFORMATION

In Visual FoxPro 5.0, create a form class that has a container such as PageFrame. In that PageFrame container, place a control that's created from a VCX-based class. Once the form is instantiated, released, and you execute a CLEAR CLASS command for that control class in the container, it causes the GPF.

Steps to Reproduce Behavior

  1. Create a button class in Class Designer. Name the button class as mybutton and the class library as TestIPF.

  2. Create a form class in Class Designer.

  3. Add a PageFrame control to the form class, then subclass the above button class in Page1 of the PageFrame control.

  4. Save the form class into the class library, TestIPF as testform.

  5. Create a .PRG, and put the following code into the .PRG:

          LOCAL oForm
    

          SET CLASSLIB TO TestIPF
          oForm=CREATEOBJECT("testform")
          oForm.Release
          CLEAR CLASS testform
          CLEAR CLASS testbutton  && IPF here
    

  6. Save and run the .PRG.

Immediately after you run the form, the GPF occurs when the execution hits the CLEAR CLASS command.
Keywords          : buglist5.00 FxprgClassoop vfoxwin vfpfix5.0a
Version           : 5.0
Platform          : WINDOWS


================================================================================


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