PRB: CLEAR ALL with Object References Causes Page Fault

Last reviewed: November 11, 1996
Article ID: Q158755
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0

SYMPTOMS

If there are objects that reference each other, Visual FoxPro displays the following error message when CLEAR ALL is carried out:

   This Program has performed an illegal operation and will be shut down.

Visual FoxPro terminates due to an Invalid Page Fault.

WORKAROUND

Delete object references before carrying out CLEAR ALL.

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 Behavior

  1. Create and run a program containing the following code:

          oform = CreateObject( "Form" )
          oform.AddObject("X", "CB")
          oform.AddObject("Y", "CB")
          oform.y.pointer=oform.x
          oform.x.pointer=oform.y
          CLEAR ALL  && This causes an Invalid Page Fault and
    
                     && shuts down Visual FoxPro.
    
          DEFINE CLASS CB as CommandButton
            pointer= .NULL.
          ENDDEFINE
    
    
Object references for "X" and "Y" above can be cleared by doing the following:

      oform.removeobject("X")
      oform.removeobject("Y")


KBCategory: kbprg kbenv kberrmsg kbprb
KBSubcategory: FxprgClassoop FxenvError
Additional reference words: 5.00 vfoxwin kbdsd



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: November 11, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.