Note that there are some explanatory texts on larger screens.

plurals
  1. POAttempted to read or write protected memory in Oracle 11g with ODP.NET
    primarykey
    data
    text
    <p>I am developing an application that is supposed to run for long periods and make extensive usage of an Oracle (11g) database via ODP.NET.</p> <p>It happens, though, that once in a while (every 2 or 3 days) a System.AccessViolationException is thrown by ODP.NET and then the application needs to be restarted. Here is my stack trace:</p> <pre><code>Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&gt; System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Oracle.DataAccess.Client.OpsSql.Prepare2(IntPtr opsConCtx, IntPtr&amp; opsErrCtx, IntPtr&amp; opsSqlCtx, IntPtr&amp; opsDacCtx, OpoSqlValCtx*&amp; pOpoSqlValCtx, string pCommandText, IntPtr&amp; pUTF8CommandText, OpoMetValCtx*&amp; pOpoMetValCtx, Int32 prmCnt) at Oracle.DataAccess.Client.OracleCommand.ExecuteNonquery() </code></pre> <p>The rest of the stack trace is different from time to time and refers to internal calls from my application.</p> <p>Now, I've made a fair amount of research before asking here, but I have found nothing conclusive. A number of other people are apparently experiencing the very same problem, although the root causes seem to vary a lot. I really hope somebody has a solution for this one :-)</p> <p>On an unrelated note, it appears that this exception is capable of ignoring my catch {} blocks and result in an application crash every time it occurs. Is that because it is related to memory corruption issues?</p> <p>Regards, Andrea</p> <p>edit: further investigation led me to believe that it could be worth starting the "Distributed Transactions Coordinator" service and see if the exception stops being thrown. What do you think?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload