AccessViolationException issue
Posted: Thu 04 Jul 2013 07:45
Our company is using dotConnect for Oracle to access the Oracle database.
We encounter an ‘AccessViolationException’ error when we use it, the error does not happen each time, but it caused a lot of troubles for us.
Here is the environment:
the Devart.Data version is 5.0.392.0
the Devart.Data.Oracle version is 6.70.293.0
the Oracle Server version is 11.2.0.2.0
the Oracle Client version is 11.2.0.1.0
the NLS Parameters:
1 NLS_NCHAR_CHARACTERSET AL16UTF16
2 NLS_LANGUAGE AMERICAN
3 NLS_TERRITORY AMERICA
4 NLS_CURRENCY $
5 NLS_ISO_CURRENCY AMERICA
6 NLS_NUMERIC_CHARACTERS .,
7 NLS_CHARACTERSET WE8MSWIN1252
8 NLS_CALENDAR GREGORIAN
9 NLS_DATE_FORMAT DD-MON-RR
10 NLS_DATE_LANGUAGE AMERICAN
11 NLS_SORT BINARY
12 NLS_TIME_FORMAT HH.MI.SSXFF AM
13 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
14 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
15 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
16 NLS_DUAL_CURRENCY $
17 NLS_COMP BINARY
18 NLS_LENGTH_SEMANTICS BYTE
19 NLS_NCHAR_CONV_EXCP FALSE
20 NLS_RDBMS_VERSION 11.2.0.2.0
Here is the error call stack:
Case 1:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OciDynamicType.nativeOCIObjectFree(HandleRef , HandleRef , HandleRef , Int16 )
at OciDynamicType.OCIObjectFree(HandleRef , HandleRef , HandleRef , Int16 )
at Devart.Data.Oracle.l.a(IntPtr A_0)
at Devart.Data.Oracle.a4.l()
at Devart.Data.Oracle.a4.a()
at Devart.Data.Oracle.OracleDataReader.Close()
at Devart.Data.Oracle.OracleDataReader.Dispose(Boolean disposing)
Our code…
Case 2:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OciDynamicType.nativeOCILobGetLength(HandleRef , HandleRef , IntPtr , Int32& )
at OciDynamicType.OCILobGetLength(HandleRef , HandleRef , IntPtr , Int32& )
at Devart.Data.Oracle.cd.k()
at Devart.Data.Oracle.OracleLob.ReadLobCache()
at Devart.Data.Oracle.OracleParameter.a(OracleDbType A_0, Object A_1, Type& A_2, Object& A_3, Byte[] A_4,
Hashtable A_5, Int32 A_6, Int32 A_7, Int32 A_8, Int32 A_9, Boolean A_10, Boolean A_11, OracleCommand A_12,
ParameterDirection A_13, ai A_14, OracleType A_15)
at Devart.Data.Oracle.OracleParameter.a(a7& A_0, Boolean A_1, Boolean A_2, OracleCommand A_3, Byte[] A_4,
Hashtable A_5, ai A_6)
at Devart.Data.Oracle.OracleCommand.a(OracleParameterCollection A_0, a7[] A_1, c1 A_2, ai A_3)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32
startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
Our code
It is quite important for our company, if you can help us or give us proposal to solve the problem, we will be very appreciated.
We encounter an ‘AccessViolationException’ error when we use it, the error does not happen each time, but it caused a lot of troubles for us.
Here is the environment:
the Devart.Data version is 5.0.392.0
the Devart.Data.Oracle version is 6.70.293.0
the Oracle Server version is 11.2.0.2.0
the Oracle Client version is 11.2.0.1.0
the NLS Parameters:
1 NLS_NCHAR_CHARACTERSET AL16UTF16
2 NLS_LANGUAGE AMERICAN
3 NLS_TERRITORY AMERICA
4 NLS_CURRENCY $
5 NLS_ISO_CURRENCY AMERICA
6 NLS_NUMERIC_CHARACTERS .,
7 NLS_CHARACTERSET WE8MSWIN1252
8 NLS_CALENDAR GREGORIAN
9 NLS_DATE_FORMAT DD-MON-RR
10 NLS_DATE_LANGUAGE AMERICAN
11 NLS_SORT BINARY
12 NLS_TIME_FORMAT HH.MI.SSXFF AM
13 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
14 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
15 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
16 NLS_DUAL_CURRENCY $
17 NLS_COMP BINARY
18 NLS_LENGTH_SEMANTICS BYTE
19 NLS_NCHAR_CONV_EXCP FALSE
20 NLS_RDBMS_VERSION 11.2.0.2.0
Here is the error call stack:
Case 1:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OciDynamicType.nativeOCIObjectFree(HandleRef , HandleRef , HandleRef , Int16 )
at OciDynamicType.OCIObjectFree(HandleRef , HandleRef , HandleRef , Int16 )
at Devart.Data.Oracle.l.a(IntPtr A_0)
at Devart.Data.Oracle.a4.l()
at Devart.Data.Oracle.a4.a()
at Devart.Data.Oracle.OracleDataReader.Close()
at Devart.Data.Oracle.OracleDataReader.Dispose(Boolean disposing)
Our code…
Case 2:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at OciDynamicType.nativeOCILobGetLength(HandleRef , HandleRef , IntPtr , Int32& )
at OciDynamicType.OCILobGetLength(HandleRef , HandleRef , IntPtr , Int32& )
at Devart.Data.Oracle.cd.k()
at Devart.Data.Oracle.OracleLob.ReadLobCache()
at Devart.Data.Oracle.OracleParameter.a(OracleDbType A_0, Object A_1, Type& A_2, Object& A_3, Byte[] A_4,
Hashtable A_5, Int32 A_6, Int32 A_7, Int32 A_8, Int32 A_9, Boolean A_10, Boolean A_11, OracleCommand A_12,
ParameterDirection A_13, ai A_14, OracleType A_15)
at Devart.Data.Oracle.OracleParameter.a(a7& A_0, Boolean A_1, Boolean A_2, OracleCommand A_3, Byte[] A_4,
Hashtable A_5, ai A_6)
at Devart.Data.Oracle.OracleCommand.a(OracleParameterCollection A_0, a7[] A_1, c1 A_2, ai A_3)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32
startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
Our code
It is quite important for our company, if you can help us or give us proposal to solve the problem, we will be very appreciated.