FIX: GPF/UAE After Undoing Edit of Option Explicit Statement (94216)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0

This article was previously published under Q94216

SYMPTOMS

A General Protection (GP) fault or Unrecoverable Application Error (UAE) occurs if you attempt to undo the edit of an Option Explicit statement while in break mode.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

The following steps reproduce this problem:

  1. Run Visual Basic, or if Visual Basic is already running, choose New Project from the File menu (ALT, F, N). Form1 is created by default.
  2. Under the general declarations section for Form1, enter the statement "Option Explicit" if it is not already there.
  3. From the Run menu, choose Start (ALT, R, S)
  4. Press CTRL+BREAK to break execution.
  5. Edit the Option Explicit statement in the general declarations section of Form1 by pressing the BACKSPACE key to delete the last character from the statement. In other words, delete the t so that you end up with Option Explici.
  6. From the Edit menu, choose Undo (ALT, E, U) to undo the edit.
  7. Choose the Cancel button when you see this message:
    "You will have to restart your program after this edit-proceed anyway?"
  8. Choose the Cancel button again when you see the same message again:
    "You will have to restart your program after this edit-proceed anyway?"
At this point, you will experience a GP fault in Windows version 3.1 or a UAE in Windows version 3.0.

Modification Type:MinorLast Reviewed:1/8/2003
Keywords:kbbug KB94216