IndexOutOfRangeException during select

IndexOutOfRangeException during select

Postby drichter » Thu 18 Mar 2010 15:07

This exception happens very rarely and only on the first request to the instantiated DataContext...

Any ideas?


Version:
4.55.42.0

Code:
Code: Select all
dbUser = db.Users.SingleOrDefault(p => p.Username == userName);



Stacktrace:
Code: Select all
   bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   bei Devart.Data.Linq.Provider.DataSourceInfo.TypeSystemProvider.GetProviderType(String typeName)
   bei Devart.Data.Linq.Provider.Query.SqlFactory.Default(MetaDataMember member)
   bei Devart.Data.Linq.Provider.Query.ar.a(d A_0, MetaType A_1, List`1& A_2, List`1& A_3, SqlExpression& A_4, IList`1 A_5)
   bei Devart.Data.Linq.Provider.Query.ar.b(d A_0, MetaType A_1, List`1& A_2, List`1& A_3, SqlExpression& A_4, IList`1 A_5)
   bei Devart.Data.Linq.Provider.Query.ar.a(d A_0, IList`1 A_1)
   bei Devart.Data.Linq.Provider.Query.ar.a(MetaType A_0, ITable A_1, IList`1 A_2)
   bei Devart.Data.Linq.Provider.Query.ar.a(bh A_0)
   bei Devart.Data.Linq.h.a(bh A_0, List`1 A_1)
   bei Devart.Data.Linq.h.a(MetaDataMember A_0, bh A_1, List`1 A_2)
   bei Devart.Data.Linq.Provider.g.b.a(q A_0)
   bei Devart.Data.Linq.Provider.g.b.a(SqlExpression A_0)
   bei Devart.Data.Linq.Provider.g.b.b(SqlExpression A_0)
   bei Devart.Data.Linq.Provider.g.a(f A_0, SqlExpression A_1)
   bei Devart.Data.Linq.Provider.g.a(Type A_0, SqlExpression A_1, f A_2, p A_3)
   bei Devart.Data.Linq.Provider.DataProvider.c.a(Int32 A_0)
   bei Devart.Data.Linq.Provider.DataProvider.a(c A_0, f A_1, IDbConnection A_2, IDataReader A_3)
   bei Devart.Data.Linq.Provider.DataProvider.a(c A_0, f A_1, Object[] A_2, Object[] A_3, Object A_4)
   bei Devart.Data.Linq.Provider.DataProvider.a(c A_0, Object[] A_1)
   bei Devart.Data.Linq.Provider.DataProvider.h(Expression A_0)
   bei Devart.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
   bei System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
   bei MyCharityUserService.UserService.GetUser(Nullable`1 userID, String userName) in D:\xxxx\UserService.cs:Zeile 181.
   bei SyncInvokeGetUser(Object , Object[] , Object[] )
   bei System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   bei System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
drichter
 
Posts: 20
Joined: Fri 21 Aug 2009 14:44

Postby AndreyR » Fri 19 Mar 2010 14:36

Are you using dataContext in multithreaded environment?
The problem seems to be associated with it.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for PostgreSQL