FIX: GPF in VB.EXE at 0038:3B6F w/ Compile-Time Error & Set (105140)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q105140 SYMPTOMS
When you try to run a program within the development environment, a
general protection (GP) fault occurs immediately in module VB.EXE at
0038:3B6F.
CAUSE
The 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
WORKAROUND
Find 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.
STATUS
Microsoft 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.
Modification Type: | Major | Last Reviewed: | 10/28/2003 |
---|
Keywords: | kbbug kbfix KB105140 |
---|
|