FIX: GPF in VB.EXE at 0038:3B6F w/ Compile-Time Error & SetLast reviewed: October 30, 1997Article ID: Q105140 |
3.00
WINDOWS
kbenv kbbuglist
The information in this article applies to: - Standard and Professional Editions of Microsoft Visual Basic for Windows, version 3.0
SYMPTOMSWhen you try to run a program within the development environment, a general protection (GP) fault occurs immediately in module VB.EXE at 0038:3B6F.
CAUSEThe problem can occur when there is a compile-time error (such as a syntax error) followed by a Set statement where the left hand side of the Set is not a simple object variable. The compile-time error does not have to involve an object variable. Examples of object variables that are not simple are object arrays and nested OLE objects.
Static a(10) As Form Set a(i) = Form1 ' setting an object array element Static b As Object Set b = CreateObject(...) Set b.c = ... ' setting an object variable within an object WORKAROUNDFind and correct the compile-time error. This takes some effort because the GP fault occurs before VB.EXE shows the location of the error. To narrow down the search for the statement causing the error, remove Set statements from your code until the GP fault no longer occurs. Then correct all compile-time errors, and put the Set statements back in.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Microsoft Visual Basic version 4.0 for Windows.
MORE INFORMATIONThe following code reproduces the problem:
Sub Form_Load () Static a(0) As Form Print 1 >= "a" ' type-mismatch error Set a(0) = Nothing End Sub |
Additional reference words: buglist3.00 fixlist4.00 3.00 UAE GPF
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |