Situation: A modal form with the ctTips 4.0 control on it. Application runs on a terminal server. Minimizing and maximizing the terminal server window crashes VFP 9 inside the ctTips control. - Christof Wollenhaupt
tested in VFP6 sp5 ,and VFP 8
m.f1 = CREATEOBJECT("custom")
m.f1.af1 = CREATEOBJECT('custom')
?m.f1.af1.af1 && crashes out VFP with C5
I was recently in the midst of irritating C0..05 (I don't remember how many zeros are in it ) croppingup in one of my form which was importing data from CSV files.
I was using Remote Views on a FirdBird backend. One thing I had to do was delete previous data if the user had asked for the same data reimported from CSV files. For this delete I had used the standard VFP DELETE FOR command on the remote view. Followed by the import of data logic from CSV file. And bang C0..05 would want to crop up any time.
Now I have tried the deletion of data using SQL Pass Through and lo no more C0..05 (I doubt this may be a premature announcement on my part due to my excitement of missing it for a few import sessions but I will still try more). Plus the deletion is noticable faster.
Hope it helps other where C0..05 appears even though best possible coding practices esp. regarding object references are maintained.
There's another circumstance that will get VFP to C0000005, which has to do with memo files, I belive. We have a routine which does it's own data cleanup on an application, including moving the tables out from the current directory, creating new ones, and APPENDing the old data back in.
Occasionally, a file will get corrupted (I suspect it's the memo gettng corrupt, actually, as it seems to occur on a file with large memos much more often), and if you try to APPEND from it (or PACK it), VFP will C5.
I've written a program which "repairs" such a file -- I havn't saved one of these files yet (yes, stupid, I know), but next time I will, and send in on to the fox team. Keep in mind, this program will not fix the table if you can't open it, just if you get a C5 when appending from it.
__ Fix Fpt
vfp6.0 SP5 still throws C5 after a SET STEP ON and RESUME. I found
one way to eliminate C5 in this case is to issue CLEAR DEBUGGER in the command window. -BrettC
The shortest program generating C0000005 Error:
Already reported to MSFT
Ouch. Still C5s in VFP7. -- Peter Crabtree
You can send information to Microsoft that will help them address this fatal exception. The functionality for error reporting was introduced in FP7 Service Pack 1. If you are already using Service Pack 1, you can click the Send Error Report button in the error dialog that appears. If not, you can update Visual FoxPro 7 to Service Pack 1 by downloading the service pack from http://msdn.microsoft.com/vfoxpro/downloads/updates.asp and installing it.
An Exception Error occurs when a process (application, driver, etc.) tries to execute a processor command that references memory outside the space allocated to that process by the Operating System. It is a feature of a good OS to trap such violations and deal with them, which typically means shutting down the process that caused them. NT is much more 'alert' to these violations than win9x.
This statement is based on a general understanding of OS's and processors, not specific knowledge of the C5 error. Please find a more reliable source before you take it as fact.
Robert Green verified this to be correct. -- Carl Karsten
It's not 'a' bug, it's a whole class of errors.
Please see Manual Garbage Collection for a cure to many C5 error woes.-- Steven Black
I consider this a workaround.
You, whoever you are, have no choice in the matter-- Steven Black
This was in response to "Fix the root cause." (I am assuming it was you < g> ) I switched to 98, you wrote some nice code, which I will concede is more elegant, but takes a skill that I don't have (yet). The root cause is somewhere in VFP.EXE -- Carl Karsten
I spoke to Calvin Hsia a few Devcons ago, and asked him if there was any reason why an object, when being destroyed, couldn't automatically NULL out any object references stored in its properties. Would this break anything, or does this go against something in the underlying C++ code which would prevent such an action? Also, why couldn't the release of a container force the destruction of any contained objects, even if there were external references to those objects? (Those references would then return NULL). He said he couldn't think of anything at that moment, and I haven't heard of anything since. Makes me wonder why this isn't built into the product. -- Ed Leafe
Make sure you are running the Current Version of VFP, Windows, and any tools.
Make sure your (and your tools) object files are compiled using the current version.
There are many things in VFP6 that cause a c0000005 error. Just take a look at all of the ones that SP3 fixed. I found 28 references to it at http://support.microsoft.com/support/kb/articles/q230/7/29.asp
Here they are. All these are Fixed in SP3.
Q193472 C0000005 Fatal Error Exiting Top-Level Form App in Win 95
Q195273 C0000005 Fatal Error When Removing Form From a Formset
Q199006 C0000005 Fatal Error Issuing PACK
Q221617 C0000005 Fatal Error After Frequent Use of CHRTRAN()
Q221621 C0000005 Fatal Error In Editor Selecting Text Then Up Arrow
Q221634 C0000005 Error With CLOSE ALL in Project Hook BeforeBuild
Q221640 C0000005 Fatal Error Importing Chinese Excel 97 Worksheet
Q221657 C0000005 Error With Specific Access Methods and Debugger
Q221664 C0000005 Fatal Error Doing USE on ADO Recordset Twice
Q221665 C0000005 Fatal Error With Invalid Form Include File Syntax
Q221680 C0000005 Fatal Error with TRANSFORM() on Long Strings
Q221687 C0000005 Fatal Error with CLEAR DEBUGGER and SUSPEND
Q221690 C0000005 Error with Repeated SQL SELECTs Using BETWEEN( )
Q221718 C0000005 Fatal Error Saving Form Set After Add Cancel in DE
Q221696 C00000FD Fatal Error Docking Toolbar in Rare Circumstance
Q221702 C0000005 Fatal Error w/ ISBLANK( ) and Array Prop in Init
Q221722 C0000005 Fatal Error Using DIRECTORY("\\\dirname")
Q221726 C0000005 Fatal Error Creating Index Tag
Q221728 C0000005 Fatal Error With MODIFY WINDOW SCREEN in EXE
Q221733 C0000005 Fatal Error With French Wizstyle Baseform Class
Q221734 C0000005 Fatal Error With Invalid Property Name
Q221737 C0000005 Fatal Error With SET('RELATION') Function
Q221741 C0000005 Fatal Error With Unknown Var in Include File
Q221742 C0000005 Fatal Error With Big Array Property
Q221743 NVL() Releases Object Ref and Causes Fatal Error C0000005
Q221744 C0000005 Fatal Error During Build w/ Invalid Preprocessors
Q221747 C0000005 Fatal Error Passing FGETS() a String > 256 Chars
Q222136 C0000005 Fatal Error Typing Characters in Find Dialog
Still Issues vfp6?
Q221745 BUG: C0000005 Fatal Error Using GETPEM() in Loop with Debugger
Added 07/01/00 by Dave Purnell
Just recently had the C5 error from a simple SUSPEND called in a form method. It wasn't happening in the early stages of my project development so I couldn't isolate the cause. I eventually re-installed VFP and the problem stopped.
I sometimes get them just trying to set a breakpoint in the debugger or looking at a value of a variable in the trace window. Very frustrating to say the least. VS SP4 does not fix these problems either. I checked with Mike Feltman to see if he's having any better luck with Win2000 and he said nope. -- Randy Jean
I also frequently get the C5 when trying to set a break point in trace window of the debugger. Almost invariably I'll get a C5 if I try to set a breakpoint on a variable in the watch window (though, occasionally it works, and when it would be extrememly usefull, I try it again, and it blows me completely out!) - wgcs
I occasionally get this error while I have an open connection into Oracle. Part of the time, it is happens when the connection to the Oracle server is cut abnormally. I have been able to reproduce this error. At other times, this isn't the problem but it does seem to be associated with the connection into Oracle using the Microsoft ODBC for Oracle driver. I haven't been able to reproduce the error. Any thoughts? -- Gregg Geeslin
There have been a few threads on the UT on the C5 in Debugger issue. In some cases deleting the FOXUSER.* resource files or deleting the debug-related records in that table fixes the problem. -- Al Doman
Heres another: Declaration or creation of variables in a destroy method are another source of C0000005 errors. I reported this problem to Microsoft and they admitted the problem and promised a fix sometime.
for li = 1 TO 4000
o = createobject('ver')
set message to str(li)
endfor &&* li = 1 TO 2000
define class ver as custom
lc = 'D' && 'local lc' will also crash
endfunc &&* destroy
-- James Beerbower
I don't see a crash, but a hang instead, at 1023 iterations. You can increase the config file setting MVCOUNT= to make it take longer before the hang occurs. -- Jim Saunders
Tested with VFP7 SP1 - no problem. Used 1 million iterations - no problem. Looks like it's fixed in VFP7 -- Peter Crabtree
01/20/2002 This also causes a C5 error. Situation Grid Class Init. Grid class has a hidden property called This.lSet (which I assumed was initialised to false. The following code is during the addition of custom column classes, which just allows the enduser to turn grid highlighting On/Off causes the C5. If I add This.lSet = .f. at the top of Init, the C5 disappears
.Columns(nColCount).DynamicBackColor = "iif(This.lSet,iif(recno( )% 2 = 0, rgb(255,255,255),rgb(192,220,192)),'')"
I see this in Visual FoxPro 7 SP1, but VFP8 does not C5 in this situation.
I just found out that leaving coverage on until the file reaches 2 Gigs produces seemingly random C5's -- Stephen Adels
Contributors: Carl Karsten Mike Feltman Steven Black Bob Archer Randy Jean Peter Crabtree
Category VFP Troubleshooting.
( Topic last updated: 2016.08.08 06:27:22 PM )