Issue Details (XML | Word | Printable)

Key: DNET-689
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Christian B
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
.NET Data provider

Commit on .NET Data provider throws NullReferenceException.

Created: 09/Aug/16 08:00 AM   Updated: 21/Feb/17 07:47 AM
Component/s: ADO.NET Provider
Affects Version/s: 4.10.0.0
Fix Version/s: 5.8.0.0

Environment:
Server: Windows 2012 R2 x64
Application: .Net Framework 4.5, Firebird .NET Provider 4.10.0.0, EF 6.0.0.0
Issue Links:
Relate
 


 Description  « Hide
Sometimes following error occurs, when we try to executing a procedure on database like this: db.Database.ExecuteSqlCommand("execute procedure...")

An error was reported while committing a database transaction but it could not be determined whether the transaction succeeded or failed on the database server. See the inner exception and http://go.microsoft.com/fwlink/?LinkId=313468 for more information. System.Data.Entity.Infrastructure.CommitFailedException CommitFailedException System.Data.Entity.Infrastructure.CommitFailedException: An error was reported while committing a database transaction but it could not be determined whether the transaction succeeded or failed on the database server. See the inner exception and http://go.microsoft.com/fwlink/?LinkId=313468 for more information. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at FirebirdSql.Data.Client.Managed.Version10.GdsTransaction.Commit() in C:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsTransaction.cs:line 172
   at FirebirdSql.Data.FirebirdClient.FbTransaction.Commit() in C:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbTransaction.cs:line 142
   at System.Data.Entity.Infrastructure.Interception.DbTransactionDispatcher.<Commit>b__c(DbTransaction t, DbTransactionInterceptionContext c)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   --- End of inner exception stack trace ---
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbTransactionDispatcher.Commit(DbTransaction transaction, DbInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.EntityTransaction.Commit()
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass59.<ExecuteStoreCommand>b__57()
   at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreCommand(TransactionalBehavior transactionalBehavior, String commandText, Object[] parameters)
   at System.Data.Entity.Internal.InternalContext.ExecuteSqlCommand(TransactionalBehavior transactionalBehavior, String sql, Object[] parameters)
   at System.Data.Entity.Database.ExecuteSqlCommand(TransactionalBehavior transactionalBehavior, String sql, Object[] parameters)
   at System.Data.Entity.Database.ExecuteSqlCommand(String sql, Object[] parameters)
System.Action`3[TInterceptor,TTarget,TInterceptionContext], System.Action`3[TInterceptor,TTarget,TInterceptionContext]) at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbTransactionDispatcher.Commit(DbTransaction transaction, DbInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.EntityTransaction.Commit()
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass59.<ExecuteStoreCommand>b__57()
   at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreCommand(TransactionalBehavior transactionalBehavior, String commandText, Object[] parameters)
   at System.Data.Entity.Internal.InternalContext.ExecuteSqlCommand(TransactionalBehavior transactionalBehavior, String sql, Object[] parameters)
   at System.Data.Entity.Database.ExecuteSqlCommand(TransactionalBehavior transactionalBehavior, String sql, Object[] parameters)
   at System.Data.Entity.Database.ExecuteSqlCommand(String sql, Object[] parameters)
NullReferenceException Object reference not set to an instance of an object. Void Commit()

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jiri Cincura added a comment - 11/Aug/16 02:43 PM - edited
Can you replicate it? I.e. under pressure. Or like running the code 10000 times? It should be fixed in 5.0.0 so it might be good to check that version.

Christian B added a comment - 11/Aug/16 03:07 PM
I was not able to replicate it. It happens not very often, but i think it does not depend on pressure. I will test with new provider 5.0.5.0...

Jiri Cincura added a comment - 05/Sep/16 05:50 PM
It's probably race condition with finalizer somewhere - DNET-698.

Christian B added a comment - 14/Oct/16 06:46 AM
I tested version 5.1.1.0 for a few weeks, bug seems to be fixed in this version.

Jiri Cincura added a comment - 14/Oct/16 06:53 AM
That's good to hear. But I think it's just a coincidence. I planning to do the DNET-698 soon, so that will hopefully fix it forever.