FIX: Unload in 3D GroupPush Button Causes GP Fault

ID: Q100327

3.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Professional Edition of the Microsoft Visual Basic Programming

  System for Windows, versions 2.0 and 3.0
- Professional Toolkit for Microsoft Visual Basic Programming
  System for Windows, version 1.0

SYMPTOMS

A general protection (GP) fault occurs when you place an Unload statement in the GroupPush3D1_Click event procedure of the THREED.VBX custom control. A GP fault also results, but at a different address, when you use the THREED.VBX custom control shipped with the Professional Edition of Visual Basic version 3.0 for Windows in a Visual Basic version 2.0 or 1.0 application.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0.

MORE INFORMATION

Steps to Reproduce Problem

1. Start Visual Basic or from the File menu, choose New Project (ALT, F, N)

   if Visual Basic is already running. Form1 is created by default.

2. From the File menu, choose Add File. In the Files box, select the
   THREED.VBX custom control file. The six 3D controls appear in the
   Toolbox. Add Form2 to the project by choosing New Form from the File
   menu.

3. Select the GroupPush3D button tool (with the letters R and B on it)
   from the Toolbox, and draw it on Form1.

4. Next double-click or press F7 to get to the GroupPush3D1_Click event
   procedure. Place the following code in this event procedure:

   Sub GroupPush3D1_Click (Value As Integer)
      Unload Form1      '** result in 3.0, GPF 001D:09C0
      Form2.Show        '** result in 2.0, GPF 003B:09AB
                        '** result in 1.0, GPF 0057:0040

      '** Or
      '** Form2.Show    '** result in 3.0, GPF 001D:09BD
      '** Unload Form1  '** result in 2.0, GPF 003B:09A8
                        '** result in 1.0, GPF 005C:0629
   End Sub

5. To run the example, click the Play button, press the F5 key, or choose
   Start from the Run menu. Then click the GroupPush3D button. If you get
   an error, choose the close button, this will result in a GP fault at a
   specific address.

Additional reference words: buglist3.00 1.00 2.00 3.00 fixlist4.00 KBCategory: kbprg kbbuglist KBSubcategory: PrgCtrlsCus
Keywords          : PrgCtrlsCus kbbuglist
Version           : 3.00
Platform          : WINDOWS
Solution Type     : kbfix

Last Reviewed: November 1, 1997