System.AccessViolationException occurred after migrating from 32-bit to 64-bit

System.AccessViolationException occurred after migrating from 32-bit to 64-bit

Postby dcoracle600pro » Thu 30 Jun 2016 10:03

Hello Support,

We need your help because we have a major issue with dotConnect for Oracle.

While our web application worked fine for several years in 32-bit mode on Windows Server 2008, we had to migrate to Windows Server 2012 64-bit.

Most of the migration of the application to 64-bit went fine, but we have this issue on one functionnality:
Code: Select all
System.AccessViolationException occurred
  Message=Tentative de lecture ou d'écriture de mémoire protégée. Cela indique souvent qu'une autre mémoire est endommagée.
  Source=OciCall.dll
  StackTrace:
       à OciDynamicType.nativeOCIAttrGet(HandleRef , UInt32 , IntPtr& , IntPtr& , UInt32 , HandleRef )
       à OciDynamicType.OCIAttrGet(HandleRef , UInt32 , IntPtr& , IntPtr& , UInt32 , HandleRef )
       à Devart.Data.Oracle.a9.f()
       à Devart.Data.Oracle.OracleDataReader.b()
       à Devart.Data.Oracle.OracleDataReader..ctor(ak A_0, ak[] A_1, OracleConnection A_2, CommandBehavior A_3, Int32 A_4, Int32 A_5, OracleNumberMappingCollection A_6, Boolean A_7)
       à Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
       à Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
       à Devart.Data.Oracle.Entity.d.a(CommandBehavior A_0)
       à Devart.Common.Entity.bt.b(CommandBehavior A_0)
       à Devart.Data.Oracle.Entity.d.b(CommandBehavior A_0)
       à System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
       à System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
       à System.Data.Objects.ObjectContext.SaveChanges(Boolean acceptChangesDuringSave)
       à DataAccess.Models.AppEntities.Save() dans D:\TFS\Development\TMA\Sources\04 - Data\DataAccess\Partials\AppEntities.cs:ligne 22

Context of the error: we want to duplicate an order, so first we get the information from the original order in 'newOrder' object, then update some of information and finally save the 'newOrder' object.

The error comes with 'appUnitOfWork.Save()' operation which calls 'System.Data.Objects.ObjectContext.SaveChanges()'.
Code: Select all
var originalOrders = orderMapper.GetOrderWithDetails(parameters.DuplicationParameters.OrderIDs, parameters.LogAction);

foreach (var item in orginalOrders)
{
      var newOrder = orderMapper.Duplicate(item, parameters.LogAction);
      newOrder.Creator = currentUser;

      var appUnitOfWork = Core.Factory.Get<IAppUnitOfWork>();

      orderMapper.Save(newOrder, parameters.LogAction);
      appUnitOfWork.Save();
}

Configuration which worked successfully: Framework .NET 3.5 SP1, MVC 2, Entity Framework 1.0, dotConnect for Oracle 6.50 Pro, Oracle Client 11g 32-bit, Oracle Database 10g 64-bit

Configuration which doesn't work: Framework .NET 3.5 SP1, MVC 2, Entity Framework 1.0, dotConnect for Oracle 6.80 Pro, Oracle Client 12c 64-bit, Oracle Database 10g 64-bit

As we made an evaluation of recent dotConnect for Oracle 9.x trial some weeks ago for another problem (with CLOB), we can't currently test this error with your latest trial 9.1.45: trial period expired.

We asked first Microsoft support about this problem, but they told us to contact DevArt support about it.

We look forward to reading your answer about this problem.

Thanks in advance
Arnaud.
dcoracle600pro
 
Posts: 42
Joined: Mon 09 Apr 2012 09:57

Re: System.AccessViolationException occurred after migrating from 32-bit to 64-bit

Postby Shalex » Fri 01 Jul 2016 16:08

dcoracle600pro wrote:dotConnect for Oracle 6.80 Pro
There were several fixes concerning AccessViolationException since v6.80: https://www.devart.com/dotconnect/oracle/revision_history.html. Please try the newest (9.1.45) build.

dcoracle600pro wrote:As we made an evaluation of recent dotConnect for Oracle 9.x trial some weeks ago for another problem (with CLOB), we can't currently test this error with your latest trial 9.1.45: trial period expired.
Please submit your request for an extended trial via our contact form.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle