FIX: App.End in Unload Event Causes Error

ID: Q183420


The information in this article applies to:


SYMPTOMS

An application error occurs in module Pvb.exe when running a VBCE application:

pvb.exe - Application Error

The exception Breakpoint

A breakpoint has been reached.

(0x80000003) occurred in the application at location 0x0135e2ab.


CAUSE

The error occurs when a form unload event procedure includes the App.End statement, and that form is closed using the Close button in the upper- right corner of the display.


RESOLUTION

The following are two workarounds for this problem:


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE Project in Visual Basic 5.0. Form1 is created by default.


  2. Add a CommandButton to Form1.


  3. Add the following code to the the code module of Form1:
    
       Private Sub Command1_Click()
           App.End
       End Sub
    
       Private Sub Form_Unload(Cancel As Integer)
           App.End
       End Sub
     


  4. Save the project.


  5. Run the project. Use the CommandButton to close the form; the error should not occur.


  6. Re-run the project. Use the Close button in the upper-right corner of the display. The error described at the beginning of this article will occur.



REFERENCES

Books Online for Microsoft Windows CE Toolkit for Visual Basic 5.0.

Additional query words: vbce wce page fault ipf gpf vbce5 vbce6


Keywords          : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB 
Version           : WINDOWS:1.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: March 3, 1999