SubmitChanges throws Object reference not set to an instance of an object
Posted: Wed 20 Mar 2013 00:35
I'm getting an unhandled NullReferenceException thrown after I've bee writing thousands of inserts. The coding is pretty simple and very typical as similar code is used in dozens of other locations successfully. In this particular case I've already 7,507 entries into this table.
at Devart.Data.Linq.Engine.c4.h(IObjectEntry A_0)
at Devart.Data.Linq.Engine.c4.j()
at Devart.Data.Linq.Engine.c4.b.b()
at Devart.Data.Linq.Engine.b4.a(ConflictMode A_0)
at Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
at Devart.Data.Linq.DataContext.SubmitChanges()
....
I'm not sure where to even start to look for a solution in my code. I can also step over the SubmitChanges exception and carry on within the loop and have it successfully call and return from SubmitChanges on the next iteration of the loop. I've even been able to immediately just 'Continue' (continue in debugging in Visual Studio) on that very line and the exception on that very same line doesn't come back even though I still loop.
Devart.Data.dll version 5.0.661.0
Devart.Data.Linq.dll version 4.1.207.0
Devart.Data.PostgresSql.dll version 6.5.202.0
Devart.Data.PostgreSql.Linq.dll version 4.1.207.0
Visual Studio 2010, SP1
Windows 7 x64
Running against a PostgreSQL database version 8.3.23
at Devart.Data.Linq.Engine.c4.h(IObjectEntry A_0)
at Devart.Data.Linq.Engine.c4.j()
at Devart.Data.Linq.Engine.c4.b.b()
at Devart.Data.Linq.Engine.b4.a(ConflictMode A_0)
at Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
at Devart.Data.Linq.DataContext.SubmitChanges()
....
I'm not sure where to even start to look for a solution in my code. I can also step over the SubmitChanges exception and carry on within the loop and have it successfully call and return from SubmitChanges on the next iteration of the loop. I've even been able to immediately just 'Continue' (continue in debugging in Visual Studio) on that very line and the exception on that very same line doesn't come back even though I still loop.
Devart.Data.dll version 5.0.661.0
Devart.Data.Linq.dll version 4.1.207.0
Devart.Data.PostgresSql.dll version 6.5.202.0
Devart.Data.PostgreSql.Linq.dll version 4.1.207.0
Visual Studio 2010, SP1
Windows 7 x64
Running against a PostgreSQL database version 8.3.23