FIX: UAE/GPF When Use Static Array in Event Procedure After F5

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

The information in this article applies to:

- The Standard Edition of Microsoft Visual Basic for Windows, version 2.0

SYMPTOMS

Under very specific conditions, if you add a Static array to an event procedure, a General Protection Fault (GPF) or Unrecoverable Application Error (UAE) can occur. This problem is described in further detail below.

STATUS

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

MORE INFORMATION

Steps to Reproduce Problem

  1. Start VB.EXE.

  2. Press F5 to run the current project and then choose the 'End' option fro the 'Run' menu to stop.

  3. Add the following line of code to the Form_Load event procedure of Form1:

    static F(10) As String ' ** Do not hit the Enter or Return key

                             ' ** to proceed to the next line. Keep
                             ' ** the focus on the same line, you
                             ' ** should not see any blue colored
                             ' ** text, you should only see black text.
    
    

  4. With the cursor on the same line as the 'static' statement, minimize the code window by clicking the minimize arrow of the code window.

  5. Press the F5 key to run the project and a GPF or UAE occurs. However, if you press the Enter key after typing the line in the Form_Load event procedure, you will not encounter this problem. You should now see the words 'Static', 'As' and 'String' in the color of blue text. This informs you that the line of code has been parsed by the P-code interpreter.


Additional reference words: buglist2.00 fixlist3.00 2.00 3.00
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.