User Control Validate Event causing Invalid Page Fault (SP5) 
Author Message
 User Control Validate Event causing Invalid Page Fault (SP5)

VB is confusing itself, the usercontrol itself has an inbuilt Validate
event, rename your validation event to MyValidate and then look at the list
of events in the forms event combo, you will find both MyValidate and the
inbuilt Validate event both present.  Simply rename your event Validate
routine and your code will work.

Dave


Quote:
> I was getting an invalid page fault, which at first seemed to be related
to
> an installation problem, but now looks like a problem with SP5.

> After some more work, I have isolated the problem to the validate event of
> my user control, which is now reduced to a label, a text box and the
> following code. The test form has the user control and a button which just
> displays a MsgBox. Pressing the button causes the problem.

> '****** Start of User Control
> Event Validate(Cancel As Boolean)

> Private Sub txtQwerty_Validate(Cancel As Boolean)
>     RaiseEvent Validate(Cancel)
> End Sub
> '******* end of User Control

> The invalid page fault occurs as soon as the RaiseEvent line is executed.

> I have tested on the following systems:
> Win 98, VB6 SP5 - Fails
> Win ME, VB6 SP5 - Fails
> Win 98, VB6 No SP - OK, Sub txtQwerty_Validate never fires
> Win NT, VB6 SP3 - OK, Sub txtQwerty_Validate never fires

> I know there were issues with the text box validate not firing in SP3,
which
> is perhaps why it worked previously. With SP5, the validate event fires
but
> then crashes when I raise the User Control event.

> Can anyone else reproduce this and suggest what is going on.

> I have cross-posted to microsoft.public.vb.bugs as this now seems to be a
> bug in SP5 rather than an installation issue.

> Thanks

> John Yale

> Actual error is:

> VB6 caused an invalid page fault in
> module <unknown> at 00de:a000006c.
> Registers:
> EAX=a000006c CS=0177 EIP=a000006c EFLGS=00010202
> EBX=00000001 SS=017f ESP=007ff5c4 EBP=007ff5d0
> ECX=00000000 DS=017f ESI=007ff654 FS=4f77
> EDX=00000001 ES=017f EDI=007ff5d0 GS=0000
> Bytes at CS:EIP:

> Stack dump:
> 004841cd 0061d160 007ffad0 007ff5e0 a000006c 0061d160 00615694 007ff62c
> 004841a6 a000006c 007ff64c 00000004 00000000 007ff794 0048407d 0061d160

> And then:

> VB6 caused an invalid page fault in
> module MSVBVM60.DLL at 0177:660202df.
> Registers:
> EAX=022e5bf8 CS=0177 EIP=660202df EFLGS=00010246
> EBX=00000994 SS=017f ESP=007ff790 EBP=007ff7cc
> ECX=022f03fc DS=017f ESI=022f03fc FS=4f77
> EDX=023df888 ES=017f EDI=0000004e GS=0000
> Bytes at CS:EIP:
> 8b 00 80 78 37 1d 0f 84 3c 69 01 00 8d 45 f8 83
> Stack dump:
> 00000000 005dcdf8 00000000 bff520df 007f7000 00000000 0183fe70 bff51b5e
> 007f7000 007f7000 bff741f7 00000000 bff54e68 0001dce4 66020297 007ff7f8



> > Hello,

> > Is the error any more descriptive?
> > Invalid page fault in .....  ?

> > Cheers
> > Jason Stough



Sat, 31 Jan 2004 16:39:49 GMT  
 User Control Validate Event causing Invalid Page Fault (SP5)
Dave

That does seem to be the problem.

Thanks, John


Quote:
> VB is confusing itself, the usercontrol itself has an inbuilt Validate
> event, rename your validation event to MyValidate and then look at the
list
> of events in the forms event combo, you will find both MyValidate and the
> inbuilt Validate event both present.  Simply rename your event Validate
> routine and your code will work.

> Dave



Sun, 01 Feb 2004 18:22:16 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. End on Terminate event causes invalid page fault in Kernel32

2. Data Tips causing invalid page fault

3. MSACCESS caused an invalid page fault in module VBA332.DLL

4. MSACCESS caused an invalid page fault in module vba332.dll

5. MSACCESS caused an invalid page fault

6. Winword caused an invalid page fault in module VBE6.DLL

7. Editpaste causes invalid page fault?

8. VB5 caused an invalid page fault in module KERNEL32.DLL

9. VB6 caused invalid page fault in module MSXBSE35.DLL

10. VB6 caused an invalid page fault

11. VB6 Data Report Design Causes Invalid Page Fault

12. Native code compiled exe causes Invalid page fault

 

 
Powered by phpBB® Forum Software