Simple Query causes IndexOutOfRangeException in dotConnect
Posted: Mon 15 Nov 2010 12:26
My application is a Workflow Service, where there are many instances running at the same time. Each time I make a query, I make a new ObjectContext and dispose of it after my query.
I spotted the following error in my application with the following stack trace:
Since this error is coming from the .NET Framework Dictionary object, I doubt this is a bug in the .NET Framework. Could this be a threading issue within the Devart library? As I mention above, I dispose the ObjectContext after each use, so there should be no threading issue from my application's perspective.
I am using Devart dotConnect for Oracle Professional 5.70.170.0.
I spotted the following error in my application with the following stack trace:
This error seems to be quite rare, as I've only seen it happen once out of thousands of test runs, and I am unable to reproduce it again. The query I run is quite simple:System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary`2.Resize()
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Devart.Data.Oracle.OracleTimeStamp.a()
at Devart.Data.Oracle.OracleTimeStamp..ctor(IntPtr A_0, OracleDbType A_1, ar A_2)
at Devart.Data.Oracle.l.m(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Data.Oracle.ad.g(Byte[] A_0, Int32 A_1, Int32 A_2)
at lambda_method(Closure , Shaper )
at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
at Query.QueryExecutor(DatabaseEntities context, Int64 executorId)
Code: Select all
return (from e in context.Executors.Include("ExecutorType").Include("ExecutorState")
where e.ExecutorId == executorId
select e).FirstOrDefault();
I am using Devart dotConnect for Oracle Professional 5.70.170.0.