AccessViolationException issue

AccessViolationException issue

Postby xin_scott » 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.
xin_scott
 
Posts: 3
Joined: Wed 05 Jun 2013 02:40

Re: AccessViolationException issue

Postby Pinturiccio » Thu 04 Jul 2013 15:00

Please provide the following information:
1. These issues might be caused by some problem in Oracle Client software or client/server compatibility. To check if this is the case, you can try switching to the Direct mode or changing the version of the client. Please inform us if these problems persist in either case.
2. If possible, try the latest (7.7.276) version of dotConnect for Oracle. Does the issue persist with this version too? If you do not have access to the registered version, you can check it with the trial one: http://www.devart.com/dotconnect/oracle/dcoracle.exe.
3. If you manage to reproduce the issue persistently, then please send us a small test project with the corresponding DDL/DML scripts for reproducing the issue.
Pinturiccio
Devart Team
 
Posts: 1928
Joined: Wed 02 Nov 2011 09:44

Re: AccessViolationException issue

Postby zhuqijun » Sat 06 Jul 2013 13:05

In my case, the application runs with a lot of database access and before the 'AccessViolationException', the memory usage is very high(3GB), is this issue could be fixed by the new version 7.7.276?
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56

Re: AccessViolationException issue

Postby Pinturiccio » Mon 08 Jul 2013 13:33

We have fixed the bug with AccessViolationException in heavy load long-running applications in dotConnect for Oracle 7.7.276. This bug occurred when too much memory was in use. You can verify whether the issue is solved with this fix using the latest version of dotConnect for Oracle (7.7.276). It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/dotconnect/oracle/revision_history.html
Pinturiccio
Devart Team
 
Posts: 1928
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle