Exception Code:C0000005 ACCESS_VIOLATION

956 views
Skip to first unread message

jorda...@gmail.com

unread,
Jan 19, 2023, 1:26:51 PM1/19/23
to Harbour Users
I have an exe that is accessing files across a Windows Server network file share and am receiving the ACCESS_VIOLATION exception, below, and am wanting to know if anyone has any ideas on what could cause this.

I have checked user permissions and the user can navigate to the files just fine through File Explorer and even modify them, the Anti-virus logs do not show any activity. I can see in Computer Management on the Server that the user has opened the files on the file share, but then at some point we get an access_violation in the hb_out.log and the exe terminates. The odd thing is that even though the exe is terminated, the files are still showing opened by the user when checking open share files on the server. I have to manually close them on the server, then they become available again.

When I run the application directly on the server, I do not experience the same issue, so I have to think it has something to do with the network setup, but I'm out of ideas.

Another thing too, is that this exe works on other network file share environments, so something must be different at this particular one. Is there some kind of network setting in a Windows environment that would kill open file handles that haven't been used in a while?

ERROR:

Application Internal Error - \\xxxxx\xxxxxx\xxxxxx.EXE
Terminated at: 2023-01-19 10:55:48
Unrecoverable error 6005: Exception error:

    Exception Code:C0000005 ACCESS_VIOLATION
    Exception Address:0000000000000000
    RAX:0000000000000001  RBX:000001D56D242628  RCX:000001D56D242628  RDX:000001D56D3DC460
    RSI:0000000000000000  RDI:0000000000000001  RBP:000000C89B8FEEC0
    R8 :0000000000000230  R9 :C000000000000000  R10:000001D56D240AF0  R11:000000000000001A
    R12:0000000000000000  R13:0000000000000001  R14:000001D56D398388  R15:0000000000000000
    CS:RIP:0033:0000000000000000  SS:RSP:002B:000000C89B8FEDB8
    DS:002B  ES:002B  FS:0053  GS:002B
    Flags:00010202
    Exception Parameters: 0000000000000008 0000000000000000

alexwi

unread,
Jan 19, 2023, 3:27:01 PM1/19/23
to Harbour Users
This is an error at the cpu level. It has nothing to with files in the sense of permissions, so what you did regarding file permissions probably has no bearing on this. The only way this might be related to files is if your executable or an executable used by your program is corrupted in a way that it causes the cpu to attempt to do something "illegal."

If I'm not mistaken, the "access_violation" has to do with the cpu trying to access a memory address to which it doesn't have access based on its state when the invalid instruction was executed.

I have seen this error in Visual FoxPro and it's very hard to pin-point the cause, but a quick google search yielded some information that might prove useful: https://learn.microsoft.com/en-us/previous-versions/troubleshoot/visualstudio/foxpro/c0000005-error-troubleshoot

Search for "c0000005 vfp" or "c0000005 exception"  in google. There seems to be some good information there.

Alex

Maurício Faria

unread,
Jan 20, 2023, 6:49:28 AM1/20/23
to harbou...@googlegroups.com
Hi.
 
I have the same issue for a looong time...
Seems to be caused by the network connection been lost.
This is something introduced by Microsoft in the network at some point.
Possibly the network card driver dropping the connection in a inactivity situation, but I wasn't able to confirm that, as I have no control over all the machines accessing the application.
Disabling network card sleeping while saving energy seems to help a little.
And this seems to be related or followed by read errors 59 and 64.
I trapped errors 59 and 64 and tried to repeat the read, after trying to wake the connection and an small timeout. It seems to help a little but it isn't the solution.
I wasn't able to get rid of this.
The only solution I found was to run the application on a Remote Desktop (RDP) environment, but this is not possible in every situations.
And, of course, I can be very wrong on all of this and the issue is something else. I am not sure.
In the end, in some installations I have to coexist with this...
   
[[]] Maurício Faria
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/827ea95d-a35c-459d-9de9-ad9804626b28n%40googlegroups.com.

jorda...@gmail.com

unread,
Feb 2, 2023, 7:48:09 PM2/2/23
to Harbour Users
Thank you for the thoughts. I wasn't able to figure a solution out or figure out what was happening, but what we ended up doing is installing the exe on a different server and then running it locally instead of across the network. It is working fine with the new setup.

José M. C. Quintas

unread,
Feb 3, 2023, 9:30:00 AM2/3/23
to harbou...@googlegroups.com

There exists a limit of 15 minutes for a not used network connection.

There exists the sleep time, when machine sleeps, and all files remains opened and records locked.

There exists some people that goes to lunch, and do not close applications.

Windows reconnects all later, but application do not wait this.

A solution may be to close application after some minutes without use.


José M. C. Quintas

poopall

unread,
Feb 8, 2023, 7:47:57 PM2/8/23
to Harbour Users
Are you using Windows 10 to connect to the server ?
Reply all
Reply to author
Forward
0 new messages