Microsoft KB Archive/193502

= PRB: Cannot Quit VFP End Task Causes Application Error =

Article ID: 193502

Article Last Modified on 5/12/2003

-

APPLIES TO

 Microsoft Visual FoxPro 3.0 Standard Edition, when used with:  Microsoft Windows NT 4.0

 Microsoft Windows 95

 Microsoft Windows 98 Standard Edition  Microsoft Visual FoxPro 3.0b Standard Edition, when used with:  Microsoft Windows NT 4.0</li></ul>

 Microsoft Windows 95</li></ul>

 Microsoft Windows 98 Standard Edition</li></ul> </li> Microsoft Visual FoxPro 5.0 Standard Edition, when used with:  Microsoft Windows NT 4.0</li></ul>

 Microsoft Windows 95</li></ul>

 Microsoft Windows 98 Standard Edition</li></ul> </li> Microsoft Visual FoxPro 5.0a, when used with:  Microsoft Windows NT 4.0</li></ul>

<ul> <li>Microsoft Windows 95</li></ul>

<ul> <li>Microsoft Windows 98 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q193502

<div class="symptoms_section">

SYMPTOMS
Running a Visual FoxPro form through a READ EVENTS command without a CLEAR EVENTS command, produces an error dialog box, which contains an OK button. The following text displays in the error dialog box:

Cannot Quit Visual FoxPro

If the OK button is not selected and the error dialog box remains on the Visual FoxPro screen, when End Task is selected from the Task Manager, one of the following system errors appear (depending on the version of the operating system):

<ul> <li>In Windows 95, and in Windows 98, using Visual FoxPro 5.0x, the following error displays:

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

Clicking the Details button reveals the following message:

VFP caused an invalid page fault in module at.

</li> <li>In Windows 95 and in Windows 98, using Visual FoxPro 6.0, the following error appears:

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

Clicking the Details button reveals the following message:

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

</li> <li>In Windows NT 4.0, using Visual FoxPro 5.0x, the following error appears:

An application error has occurred and an application error log is being generated.

VFP.exe

Exception: access violation, Address:.

</li> <li>In Windows NT 4.0, using Visual FoxPro 6.0, the problem does not occur.</li></ul>

<div class="cause_section">

CAUSE
Not clearing the "Cannot Quit Visual FoxPro" error dialog box by selecting the OK button prior to selecting End Task from the Task Manager.

<div class="resolution_section">

RESOLUTION
Clear the "Cannot Quit Visual FoxPro" error dialog box by selecting the OK button prior to using End Task and the error does not occur.

<div class="status_section">

STATUS
Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

<div class="moreinformation_section">

Steps to Reproduce Behavior
WARNING: The following steps cause Visual FoxPro to crash and you may not be able to restart Visual FoxPro unless you turn your computer off and on (perform a cold boot).

NOTE: The following example would not normally be performed by a programmer using Visual FoxPro, however it is used here because it is the easiest way to demonstrate the problem.

<ol> <li>Create a program with the following FoxPro command:

READ EVENTS

</li> <li>Save and run the program.</li> <li>Try to quit Visual FoxPro, by closing the Visual FoxPro window.</li> <li>The following error displays in a dialog box, which contains an OK button:

Cannot Quit Visual FoxPro.

</li> <li>Do NOT select the OK button and keep the error dialog box on the screen.</li> <li>Invoke the Windows Task Manager and select the End Task button.

NOTE: You may need to select End Task more than once.</li> <li>One of the error messages listed in the SYMPTOMS section occurs.</li></ol>

<div class="references_section">