Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fatal error: Exception code=C0000005
Message
From
17/09/2002 03:38:06
 
 
To
17/09/2002 01:08:48
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00701089
Message ID:
00701122
Views:
16
Hi!


The reason might be inconsystensy in the Key Press event code - see comment below:
*!* The Part code I've modified
*!* All the KeyPress Method of the subclass text of a grid
LPARAMETERS nKeyCode, nShiftAltCtrl
If Between(nKeyCode,32,128)
	NODEFAULT
	RETURN
Endif
* First of all, need to forward parameters. If you do not do this and there are no parent class 
* code for this event, you will probbaly get C0000005.
* Second - DODEFAULT is required here when you have parent class code, and is NOT
* needed when you do not have it.
&& DODEFAULT(nKeyCode, nShiftAltCtrl)
If you use DODEFAULT() and there is not parent class code, default behaviour will be used twice. For example, in TextBox control such code will duplicate each character as youtype in it.

To make your code consystent and universal, you require to reqrite it by following way:
LPARAMETERS nKeyCode, nShiftAltCtrl
NODEFAULT
If Between(nKeyCode,32,128)
	RETURN
Endif
DODEFAULT(nKeyCode, nShiftAltCtrl)
I do not know if this will fix the problem.
I do not see anything in the Load() event that might cause crash, though try to get out dodefault() call if you have no parent class code.

Finally, if all above would not help...
Crash could exist because SCX or some class in it or in the library across the entire hierarchy at some point contains certain corruption. Between Load() and Init() of the form all controls are initialized. During this process, if certain control contains corruption, you also can get similar problem. In such case try to re-compile the ntire project. If this would not help, backup you form, and start to throw out, bit by bit, parts of the form till you get rid of crash. The last item you removed before form cuses no crash is the problematic item. If this item is also a structure (container or class with hierarchy of parent classes), start to dig it separately. This way you will narrow down the problem as much as possible.

HTH.

>Hi, Folks,
>After I finished some modification of my form code in VFP 7.0 without SP1, when I tried to run the form I would got Fatal error code C0000005 and caused the VFP broken down. I tried to step in the load code, found it start broken down during excuting the load event dodefault(), the following code pieces is about my modification and the load event
>
>The Part I've done the modification
>
>*!* The Part code I've modified
>*!* All the KeyPress Method of the subclass text of a grid
>LPARAMETERS nKeyCode, nShiftAltCtrl
>If Between(nKeyCode,32,128)
>	NODEFAULT
>	RETURN
>Endif
>DODEFAULT()
>
>
>The part of load event
>
>OPEN DATABASE System SHARED
>OPEN DATABASE Stock SHARED
>CREATE CURSOR Items(Invoice_ID C(16),Note_ID C(16),Factory_ID C(16),Factory_Name C(30),Total_Amount N(15,2),Total_Item N(4),Response_Person C(20),TransacTion_Date D,Brief_Note C(30),Invoiced L)
>CREATE CURSOR Detail_Items(Category_Name C(30),Class_Name C(30),Brand_Name C(30),Specification_Name C(30),Price N(15,2),Quantity N(15,2),Amount N(20,2),Brief_Note C(30))
>DODEFAULT()
>
>
>If there are anyone know how it goes on , pls give me some help. Thanks anyway.
>BTW, I wonder why I couldn't install the VFP 7.0 SP1 onto my Windows 2000 Pro. Simplify Chinese version. It always show the message box about the program start to install and ask contiune ok or not, then terminated after press ok to contiune. Is there any advice on it? Thanks again.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform