ACCESS VIOLATION ERROR

Dheeraj Mishra 1 Reputation point
2020-10-21T14:42:09.263+00:00

Hi All,

Good DAY!.

i have developed 1 job for my org.It is console application. I have placed exe to windows server 2016 and this job triggered through job monitoring tool which targets the server i.e. WINDOWS Server 2016 where job is placed.

The purpose of that job is to read the data from multiple tables through PL SQL ,compute it and insert the data in to the other application tables.

This job runs 8 times in a single day with 3 hrs interval but Sometimes one of the cycle in 2 or 3 days gets failed with following error. Job is executing successfully and capturing everything in log file ,Its doesn't throw any error.Data is also getting inserted but this error occurs at the end of job when it is completed .

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that\
other memory is corrupt.

at System.Data.Common.UnsafeNativeMethods.OCIHandleFree(IntPtr hndlp, HTYPE type)
at System.Data.OracleClient.TracedNativeMethods.OCIHandleFree(IntPtr hndlp, HTYPE type)
at System.Data.OracleClient.OciHandle.Release()
at System.Data.OracleClient.OciHandle.ReleaseHandle()
at System.Runtime.InterOLOopServices.SafeHandle.InternalFinalize()
at System.Runtime.InteropServices.SafeHandle.Finalize()

I have tried following approach.

Upgraded Linux server (CPU increase ,OS memory size)->LINUX SERVER Where Oracle database is hosted.

Made changes on Visual Studio project property and select debug mode as X64 bit ,build it and place it on server since server is 64bit ->

Batch server where job is hosted (Windows server 2016)

ORACLE CLIENT installed on the batch server is 12 C 64 bit.(Windows server 2016)

Strange thing is this approach worked on UAT environment and issue has been fixed and i replicated the same changes on production LINUX SERVER and BATCH WINDOWS SERVER but it is not working and still encountering the error .Its been a month and i am unable to resolve this issue.

Please advised what else i can try. I have tried multiple other approaches as well but nothing has worked. It is quite annoying now to resolve this issue.

Hope everyone is doing fine in this Pandemic and stay safe.

BR,

Dheeraj Mishra

Application Developer

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
938 questions
{count} votes