Foxpro7 crashing with "fatal error exception code=c0000005 ..."  
Author Message
Endre E





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

Hi
I have a tricky issue in my VFP7 application. At least tricky for me. 

The application is crashing with fatal error C0000005. Sometimes I see a message like this one in the eventlog: "Faulting application <appname>.exe, version 1.4.82.0, faulting module ntdll.dll, version 5.1.2600.2180, fault address 0x00010f29.". Sometimes the application just hangs. I also see the Windows error "The instruction at "0x...." referenced memory at "0x.....". The memory could not be "read"", and then the application is closed, of cource.

The error does only appear in situations where I print, but it does not occur in an exact pattern, or when I pass a particular code line. I use a third party dll called foxpp.dll (fox power printer) to get my "hands" on the windows printernames and properties. (I don't think the supplier exists anymore ). Since the crash does not occur when i run a particular line of code, and even sometimes when i close a window, it is hard to tell the exact reason. I am suspecting the printer dll, but it might also be other reasons. Does anyone know of a tool (or a method) to find the point where the illegal memory access occurs

The error seems to appear more often after a couple of consecutive prints. So I am thinking that a "reset" of the print objects (the loaded dll) might be a way to reduce the problem, if not removing it. Any hints how to do this "reset" in a good way

Helpful hints are highly appreciated on this "blurred" question :-)

Best regards, Endre



Visual FoxPro2  
 
 
dni





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

You may try to update vfp 7 with service pack 1, install the latest drivers for printers, check if a part from dll remains "hanged" in ram memory.

 
 
Craig Berntson





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

Are these HP drivers They're notoriusly buggy. You could apply VFP 7, SP1. You could also try to delete all the FoxUser.* files.

 
 
Endre E





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

Hi!

SP1 is installed, and FoxUser files are deleted from the location where " sys(2005)" tells me they are located (and from the other locations where I find them, also)

I have the problem with both HP printers and a Minolta printer. I use an OCX to print an Activereports report, and I think it might be this OCX that can be the issue. The application often crashes after a couple of prints. Seldom or never on the first one. I just cannot find the right way to "release" the objects in the right way, obviosly. Or maybe it is not the OCX, just the VFP use of printers.

Best Regards Endre


 
 
AndyKr





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

>>  Or maybe it is not the OCX, just the VFP use of printers

Unlikely. I would agree that it is probably a dangling reference to the OCX.

The best way to release the reference is to explicitly set it to ".NULL." This will definitely release it!

oPrintOcx = CREATEOBJECT( "ocx.ocx" )
[code here]
oPrintOcx = .NULL.



 
 
Endre E





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

How can I check if a dll "remains hanged" in memory

- - -

Endre


 
 
Endre E





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

Hi!

Thank you for your kind answers. I was/am (nearly) going mad over this one :-S. I thought for a while I have a working system again. On my PC it works fine now, but the client tester still see the same problem. I don't know _why_ it works at my PC, but I know what made it work:

I have managed to isolate the problem further:

The error appeares when applying an ocx for print: ActivereportsViewer, arview2.ocx. This ocx is added as a control to a VFP form. The ocx receives an active reports report from a .Net web service as data source and prints it. Around the third print, I see the fatal error (c00..5) - sometime just a**** application

I tried to release all objects and setting them to .NULL., but no improvement. Then I created the same ActiveX as an object in the form (CREATEOBJECT("DDActiveReportsViewer2.ARViewer2.1")), and set the same datasource for this one. Then I tried to print from this one instead, no print produced, BUT the print from the ActiveX-control in my form works, and I don't see the c0000005 no more!! My theory is that when I create the same object with "CreateObject" and afterwards sets it to .NULL. VFP manage to release it properly. But obviously not perfectly since another PC has the same issue still.

I am still kind of confused regarding what's going on. Further inputs are welcome :-)

Best regards


 
 
dni





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

You may use a program to see active processis in memory. Personally I have a analyzer on my antispyware software (AVG -ex Ewido), so I can see any time what is loaded and I can terminate a application any time.

 
 
Endre E





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

Hi!

It seems that the described actions are successful after all. We have now positive tests on the client PC's and on Citrix hosting the application.

Endre :-)


 
 
FoxyNet





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

I have the same error problem in VFP9 + SP1. Everything was working fine. I installed OCT CTP and after this installation, the problem started as follows. Whenever I browse any table (move up or down a couple of records) and close the browse windows, system crashes with this error. Sometime it also give "Memory ... cannot be accessed" error. I could'nt think of anything to do since there is no application involved here, I uninstalled CTP but still the problem remained. Finally I uninstalled VFP and reinstalled and its OK. Any idea what could be the reason. Has anyone faced the same problem in VFP9

Thank you.



 
 
AndyKr





PostPosted: Visual FoxPro General, Foxpro7 crashing with "fatal error exception code=c0000005 ..." Top

>>Finally I uninstalled VFP and reinstalled and its OK.

Sorry! But you should have posted this before uninstalling

The symptoms you described will occur if your FoxUser Table gets corrupted. The first thing to check is if the problem goes away if you SET RESOURCE OFF. If so, deleting the FoxUser table will solve the problem (VFP creates a new one anyway). It's a lot quicker than re-installing.