Source array was not long enough. Check srcIndex and length, and the array's lower bounds.

Posts   
 
    
dwohl
User
Posts: 2
Joined: 20-Feb-2017
# Posted on: 20-Feb-2017 20:24:45   

We just upgraded from 3.5 to 5.1.2 and suddenly one entity is throwing an exception on save of

Source array was not long enough. Check srcIndex and length, and the array's lower bounds.

Anybody seen this before?

Here's my stacktrace: [ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.] System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) +0 SD.LLBLGen.Pro.ORMSupportClasses.EntityFieldPersistenceInfoList..ctor(IEntityFieldCore[] fields, IFieldPersistenceInfo[] fieldsPersistenceInfo) +481 SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateUpdateDQ(IEntityFieldCore[] fields, IFieldPersistenceInfo[] fieldsPersistenceInfo, DbConnection connectionToUse, List1 pkFilters, IPredicate additionalUpdateFilter, IRelationCollection relationsToWalk) +216 SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.CreateUpdateDQ(IEntity2 entityWithNewValues, IFieldPersistenceInfo[] persistenceInfoObjects, List1 pkFilters, IPredicateExpression additionalFilter, IRelationCollection relationsToWalk) +93 SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.CreateQueryForUpdateEntitiesDirectly(IEntity2 entityWithNewValues, IRelationPredicateBucket filterBucket) +252 SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.UpdateEntitiesDirectly(IEntity2 entityWithNewValues, IRelationPredicateBucket filterBucket) +463 SD.LLBLGen.Pro.ORMSupportClasses.<>c__DisplayClass21_0.<UpdateEntitiesDirectly>b__0() +20 SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteWithActiveRecoveryStrategy(Func`1 toExecute) +28 SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.UpdateEntitiesDirectly(IEntity2 entityWithNewValues, IRelationPredicateBucket filterBucket) +86

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 20-Feb-2017 23:33:47   

That was reported once before (long time ago), and most probably the DBGeneric and DBSpecific projects used are not in Sync.

Please make sure you are using the latest generated code for both projects,

Ref: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=8079

dwohl
User
Posts: 2
Joined: 20-Feb-2017
# Posted on: 21-Feb-2017 16:47:44   

Thank you.