Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

NullReferenceException in finalizer cause apppool crashes (no replies)

$
0
0
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/2/ROOT/myapp
Process ID: 25060
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace: at MySql.Data.MySqlClient.MySqlConnection.set_Reader(MySqlDataReader value)
at MySql.Data.MySqlClient.MySqlDataReader.Close()
at MySql.Data.MySqlClient.MySqlConnection.Close()
at MySql.Data.MySqlClient.MySqlConnection.Dispose(Boolean disposing)
at MySql.Data.MySqlClient.MySqlConnection.Finalize()

For curiosity sake, I checked source code and found that while setting reader on connection class, driver is not checked for null where in this whole class driver is always checked for Null before its usage.

Source\MySql.Data\Connection.cs - Line number 119

It might be a side-effect of bug fix in datareader.cs

// always ensure internal reader is null (Bug #55558)
connection.Reader = null;


MySql.Data 6.9.9 published on nuget.org.
MySql server version 5.5
.Net framework 4.6.2
Windows 2008 R2

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>