Random "Object reference not set to an instance of an object"

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
bmarotta
Posts: 34
Joined: Wed 29 Sep 2010 11:27

Random "Object reference not set to an instance of an object"

Post by bmarotta » Tue 31 Jan 2017 18:21

Hi,

Our application process thousands of "workflow steps" daily. We get the random and not reproducible error "System.NullReferenceException: Object reference not set to an instance of an object." on the SubmitChages. This happens just after deleting an object from the database. The "funny" thing is that in 100% percent of the cases retrying the exact same code afterwards works. Below follows the last command executed and the callstack of the error. We are using Devart version 8.5.464.

I've looked in your forum and it seems that there are some entries regarding Null Exception on SubmitChanges but none of them with such a call stack.

Code: Select all

DELETE FROM PUMA_WORKFLOW_INSTANCE WHERE ID = :key1
-- key1: Input Number (Size = 0; DbType = Decimal) [17351571]
-- Context: Devart.Data.Oracle.Linq.Provider.OracleDataProvider Mapping: AttributeMappingSource Build: 4.5.802.0

2017-01-31 17:25:52,678 ERROR Exception caught on WorkflowEnd: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at xget__Id_955(Workflow )
   at Devart.Data.Linq.Mapping.Accessors.d.Accessor`2.GetValue(T instance)
   at Devart.Data.Linq.Mapping.Accessors.MetaAccessor`2.GetBoxedValue(Object instance)
   at Devart.Data.Linq.Engine.b2.c.c()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Devart.Data.Linq.Engine.c4.i(IObjectEntry A_0)
   at Devart.Data.Linq.Engine.c4.l()
   at Devart.Data.Linq.Engine.c4.j()
   at Devart.Data.Linq.Engine.b3.a(ConflictMode A_0)
   at Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
(...)
Best regards,

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Random "Object reference not set to an instance of an object"

Post by Shalex » Tue 31 Jan 2017 18:56

There were a lot of fixes since v8.5.464. Could you try using the newest (v9.2.187) build of dotConnect for Oracle?

If the issue persists, please localize the problem and send us a small test project with the corresponding DDL/DML script.

Post Reply