FIX: GPF Issuing QUIT from a Form Run in the Form Designer (186368)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a

This article was previously published under Q186368

SYMPTOMS

A General Protection Fault occurs when you run a form from the form designer. Under Windows 95, the following message appears:
This program has performed an illegal operation and will be shut down.
If the problem persists, contact the program vendor.

Under Windows NT 4.0, the following message appears:
The instruction at "0xnnnnnnnn" referenced memory at "0xnnnnnnnn." The memory could not be "read."
Click on OK to terminate the application.
Click on Cancel to debug the application.

CAUSE

This behavior occurs because a QUIT command executed while the form designer was open. The problem is not limited to form methods or events.

RESOLUTION

Do not issue a QUIT command in a form's events or methods while in the Form Designer.

STATUS

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

MORE INFORMATION

Steps to Reproduce Behavior

WARNING: Before attempting to reproduce this behavior, it is strongly recommended that you close any open tables.
  1. Using Visual FoxPro 5.0, create a new form.
  2. In the form's Destroy event, add the following code:
          QUIT
    							
  3. Close the Code window.
  4. Select Form, Run Form from the Menu bar.
  5. Click the form's Close button AND NOTE THAT a General Protection Fault occurs.
(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by John Desch, Microsoft Corporation

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug KB186368