Page 1 of 1

NullReferenceException during implicit transaction rollback

Posted: Wed 09 Mar 2016 10:32
by x86fanboy
Hi there!

The following code fragment demonstrates the issue:

using (var connection = new MySqlConnection("host=localhost;port=3306;pooling=true;user=user;pwd=pwd"))
{
connection.Open();
connection.BeginTransaction();
}

System.NullReferenceException Object reference not set to an instance of an object.
at Devart.Data.MySql.au.a(ref Int32 A_0, ref ArrayList A_1, ref ac A_2, ref String A_3)
at Devart.Data.MySql.k.e()
at Devart.Data.MySql.MySqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteNonQuery()
at Devart.Data.MySql.MySqlConnection.Rollback()
at Devart.Data.MySql.MySqlTransaction.Dispose(Boolean disposing)
at Devart.Data.MySql.j.k()
at Devart.Common.DbConnectionBase.Close()
at Devart.Data.MySql.MySqlConnection.Close()
at Devart.Data.MySql.MySqlConnection.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()

This does not happen if the transaction is rolled back explicitly.

Version: dotConnect.Express.for.MySQL.8.4.602

Re: NullReferenceException during implicit transaction rollback

Posted: Thu 10 Mar 2016 09:43
by Pinturiccio
We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

Re: NullReferenceException during implicit transaction rollback

Posted: Thu 10 Mar 2016 12:52
by x86fanboy
Great, thanks!

Re: NullReferenceException during implicit transaction rollback

Posted: Wed 25 May 2016 08:44
by Pinturiccio
We have fixed the bug with throwing NRE when a transaction associated with a connection is not closed, and the connection is implicitly closed. We will post here when the corresponding build of dotConnect for MySQL is available for download.

Re: NullReferenceException during implicit transaction rollback

Posted: Fri 27 May 2016 12:55
by Pinturiccio
New build of dotConnect for MySQL 8.5.658 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/mysql/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to viewtopic.php?t=33729