Re: Err Object Anomaly Bug in VB6+SP5 and How to Reproduce
- From: "Sean Myers" <seanm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 13 Oct 2005 10:25:28 -0400
More of a guess than a genuine solution...(experts feel free to correct me
:-) )
I would guess that the form instance (Form1) crashes, but the O/S is still
calling into that memory space, and the WindowProc attempts to access the
instance Form1 which is crashed causing the second dialog with a messed up
count. The program instability is likely caused by not unhooking your
WindowProc properly on application shutdown. (Won't happen if you just let
the application crash!)
Several things you may wish to consider:
1) Use an explicit instance of Form1.
in module:
Public gfForm1 as Form1
Sub Main()
Set gfForm1=New Form1
gfForm1.Show
End Sub
Check in your WindowProc to see if gfForm1 is nothing
2) Unhook your WindowProc on program termination.
3) Handle that error properly!
I'm not sure what you mean by Err object instability. I have never
experienced any problems with the Err object.
HTH,
Sean
.
- Follow-Ups:
- References:
- Err Object Anomaly Bug in VB6+SP5 and How to Reproduce
- From: Someone
- Err Object Anomaly Bug in VB6+SP5 and How to Reproduce
- Prev by Date: Re: c0000005 - Access Violation
- Next by Date: Re: Err Object Anomaly Bug in VB6+SP5 and How to Reproduce
- Previous by thread: Err Object Anomaly Bug in VB6+SP5 and How to Reproduce
- Next by thread: Re: Err Object Anomaly Bug in VB6+SP5 and How to Reproduce
- Index(es):
Relevant Pages
|