Page 1 of 1

Null reference exception

Posted: Wed 15 Jan 2014 01:38
by matt ryan
We are intermittently experiencing null reference exceptions when using linqconnect in our unit tests. Running the tests again without any code changes usually passes. Any ideas what could be happening?

Example 1:
This occurs when the database is being populated with test data.

Code: Select all

System.NullReferenceException : Object reference not set to an instance of an object.
STACK TRACE:
at Devart.Data.Linq.Engine.c5.h(IObjectEntry A_0)
at Devart.Data.Linq.Engine.c5.j()
at Devart.Data.Linq.Engine.c5.b.b()
at Devart.Data.Linq.Engine.b5.a(ConflictMode A_0)
at Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
at Devart.Data.Linq.DataContext.SubmitChanges()
...
Example 2:
This occurs when attaching an analysis entity as modifed to the context.

Code: Select all

System.NullReferenceException : Object reference not set to an instance of an object.
STACK TRACE:
at Clone_Analysis(Object , Object& , m )
at Devart.Data.Linq.Mapping.MetaType.b(Object A_0)
at Devart.Data.Linq.Engine.h.s()
at Devart.Data.Linq.Table.a(Object A_0, Object A_1, Boolean A_2)
...

Re: Null reference exception

Posted: Wed 15 Jan 2014 12:37
by MariiaI
Please specify the version of LinqConnect and the DBMS you are working with.
Also please send us the test project with which the issue could be reproduced, so that we are able to investigate this issue in more details.

Re: Null reference exception

Posted: Wed 15 Jan 2014 17:20
by matt ryan
LinqConnect: 4.4.364
DBMS: SQL Server 2008

I will try to create an example but it very inconsistent as is.

Re: Null reference exception

Posted: Thu 16 Jan 2014 14:20
by MariiaI
Thank you for the additional information. We couldn't reproduce this issue in our environment. We are looking forward to your reply with a test project.