Null reference exception

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
matt ryan
Posts: 15
Joined: Wed 30 Jan 2013 22:26

Null reference exception

Post by matt ryan » Wed 15 Jan 2014 01:38

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)
...

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Null reference exception

Post by MariiaI » Wed 15 Jan 2014 12:37

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.

matt ryan
Posts: 15
Joined: Wed 30 Jan 2013 22:26

Re: Null reference exception

Post by matt ryan » Wed 15 Jan 2014 17:20

LinqConnect: 4.4.364
DBMS: SQL Server 2008

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

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Null reference exception

Post by MariiaI » Thu 16 Jan 2014 14:20

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.

Post Reply