FIX: GPF/UAE w/ Stop Command in Event Procedure & Deleted Sub

Last reviewed: October 30, 1997
Article ID: Q94167
2.00 WINDOWS kbenv kbbuglist

The information in this article applies to:

- Microsoft Visual Basic programming system for Windows, version 2.0

SYMPTOMS

In Microsoft Visual Basic version 2.0 for Windows, a General Protection (GP) fault or an Unrecoverable Application Error (UAE) occurs when you attempt to delete a Sub or Function when in break mode. This problem does not occur in Microsoft Visual Basic version 1.0 for Windows.

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 the 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. Enter one line of code into the Form_Load event procedure of Form1:

    Stop

  3. In the general section enter the following procedure:

       Sub YourName ()
          '** no code is needed
       End Sub
    
    

  4. From the Run menu, choose Start (ALT, R, S). After execution is stopped, go to the YourName procedure, highlight the entire Sub, and then delete it.

  5. You will receive this error: "You will have to restart your program after this edit-proceed anyway?" Choose the OK button.

At this point, a GP fault or UAE occurs.

This problem occurs only when you delete the Sub or Function that you were viewing before you ran the program. If you had been viewing the Form_Load event instead of Sub YourName before running the above program, the problem would not have occurred.


Additional reference words: buglist2.00 fixlist3.00 1.00 2.00 3.00 GPF
KBCategory: kbenv kbbuglist
KBSubcategory: EnvtDes
Solution Type : kbfix


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