Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fatal error C0000005

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi,
Fatal error C0000005 happens sometimes.
As I remember well this might be caused by corrupt index and may be solved by throwing away the index and create index from scratch again.

Is my opinion on that still valid in VFP8 SP1 or could I have met another reason for that ?

How do I throw away the index (CDX) in code ?

-Bart
 
Bart,
There are many reasons for C0..05 errors, and while a bad index can sometimes be the problem, it's not the only one and may not be the first one I'd check on.

A lot depends on whether the error always happens at the same point in the code. Are you are using any ActiveX controls? How much memory does the system have? What else is running? Does it happen consistently on multiple systems? On different OSs and different hardware configurations?

Rick
 
Hi Rick,

Underlisted message came 'out of the blue' from an exe which used to be allright in the past.
Regarding the other issues you pointed me to I have to ask my user.

-Bart


---------------------------
Microsoft Visual FoxPro
---------------------------




Fatal error: Exception code=C0000005 @ 25-02-2004 02:14:09 PM. Error log file: C:\Program Files\Common Files\Microsoft Shared\VFP\vfp8rerr.log

Called from - frmfinancieel.afterskip line 12 {c:\program files\winchurch2000\forms\frmfinancieel.sct c:\program files\winchurch2000\forms\frmfinancieel.sct}

Called from - frmfinancieel.init line 57 {c:\program files\winchurch2000\forms\frmfinancieel.sct c:\program files\winchurch2000\forms\frmfinancieel.sct}

Called from - frmmain.cmdl1.click line 22 {c:\program files\winchurch2000\forms\frmmain.sct c:\program files\winchurch2000\forms\frmmain.sct}

Called from - start line 237 {C:\Program Files\Winchurch2000\code\start.prg c:\program files\winchurch2000\winchurch2000.exe}


---------------------------
OK
---------------------------
 
Is this only happening at your user's site? If it doesn't happen on your machine, then recreating the CDX tags is the first thing I'd try. It may also be a corrupted Foxuser file, so send them a new set, or just SET RESOURCE OFF.

If neither if these fix the problem, it's most likely corrupted data (usually in the memo field). See if you can determine which table is having the problem, and try to figure out which record in that table has a problem. If you can give us some idea of what kind of process is running when you get this error, I can give you some specifics of what to try.


-BP (Barbara Peisch)
 
Hi Barbara,

The information you are asking for , has to be given by my user. So I am going to ask them.
Regarding the 'running proces' you are talking about:
Do you mean the processes which I can see using the Ctrl-ALT-DEl in Win-XP ?

-Bart
 
By the process, I meant what part of your program is causing the problem. If it's always happening in the same place, it would help if you could post the code.


-BP (Barbara Peisch)
 
Is the form you are calling using a view? If so, you may try deleting and recreating the view to ensure it is not corrupt. If the form is not too indepth, you can do that to the form as well.

Are you running a multi-user app on the network? If so, how many users and what type of network?






Jim Osieczonek
Delta Business Group, LLC
 
Barbara,
Here is the code where the error occurs; by the way; this worked fine for months

* form method
* this method is always executed after the recordpointer has been moved
WITH thisform
=.schermupdaten()
=.chkAcceptGiroUpdaten()
=.lblAantalAGUpdaten()
=.setcaptionlblTermijnbedrag()
.lblNogTeOntvangenNaBoeking.caption=""
=dodefault()
.txtRekeningNr.inputmask=IIF(len(allt(.txtRekeningNr.value))=9, "99.99.99.999" ,"")
.txtRekeningNr.format="R"
IF .optInvoerMode.value=1
.txtToegezegd.setfocus
ELSE
.txtValdat.setfocus here is where the error occurs
ENDIF
=.refresh()
=dodefault()
ENDWITH

Jim,
Ni, not a multi-user app. And YES, in the DE I do have 4 views.


I by myself wil give building a new index-file a first change.

-Bart
 
Are you always on the same record when this happens, or does it happen with any record? If it's any record, I would look at something in the code. If it's only one record, or specific records, you've probably got corrupted data in those records.

In case it's in the code, do any of the functions that you're calling above the .txtToegezegd.setfocus change the selected alias? Do any of them add or delete records? Is there a Valid event listed anywhere in the calling stack at this point?


-BP (Barbara Peisch)
 
Barbara,
My user told me that this error happens after closing this form, doing another form and then return to this form.
At first the error happened sometimes but later on the error came up some more times. So in fact the error happens which same record I think. Have to ask the user for it.
-Bart
 
This sounds like a data problem. Have you tried recreating their index tags? Otherwise, you need to track down the corrupted data.


-BP (Barbara Peisch)
 
Barbara,
I've sent a new exe with recreate-index facilities.
So going to wait for the result now.
-Bart
 
Hi,

From the user's feedback I understand that this error happens after a : thisform.refresh()
Any idea ?

-Bart
 
Hi Barbara,
Yes I've included a feature for that which deletes the cdx and recreates from scratch.
-Bart
 
Hi,
Would this error probably been caused by a memory issue ?
I put a button on my mainform in which i put code:
=messagebox(transform(sys(1016)). The displayed value increases!
From that I understood that the objects are taking or holding(?) memory allocated ?
So I am walking out of memory ?
Would a carbage collection be needed manual?
I also found another strange behaviour that tables in the DE are not closed automaticly.
Any suggestion ?
-Bart
 
Dear friends,
From the error log file I found that my C5 mostly happens once there is command : thisform.refresh()
It happens at several methods.
Does this makes sense ?
-Bart
 
Yes, since at this point VFP will have to call all (most?) of the individual control's refresh() methods. If you are using any non-VFP controls - including the generic MS ones - they could be causing trouble.

Rick
 
Hi Rick,

Well on that form only normal (subclassed) native vfp-controls are placed.
Would it be possible to put some code in the form's refresh method that cycles through all indivudual refresh methods to trigger the one causing the error?
And if so, how could I code that ?

(using VFP8)

-Bart
 
sir bart,

we've encountered the same error message just yesterday and in the tracing process, we found out that the memo file of one of the tables has been corrupted. if you have a memo field in one of your tables maybe it's a good place to look.

thought this might help.

kilroy [trooper]
philippines
"and that's what we call creativity..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top