Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 27546 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
When trying to connect to Oracle database using pooling, I get Unhandled Exception when the program terminates.
callstack for this error:
Cannot cast from source type to destination type.
at System.Data.OracleClient.OracleConnectionPoolManager.Dispose () [0x00000] in <filename unknown>:0
at System.Data.OracleClient.OracleConnectionPoolManager.Finalize () [0x00000] in <filename unknown>:0
There is quite easy way how to simulate this bug: (this code is almost ctrl+c, ctrl+v from sample how to connect to oracle using mono)
string connectionString = "User ID=xxxx;Data Source=yyyy;password=zzzz;Pooling=true;Min Pool Size=1;Max Pool Size=10";
using (OracleConnection dbcon = new OracleConnection(connectionString))
OracleCommand dbcmd = dbcon.CreateCommand();
string sql = "SELECT 1 FROM dual";
dbcmd.CommandText = sql;
OracleDataReader reader = dbcmd.ExecuteReader();
// clean up
reader = null;
dbcmd = null;
Console.WriteLine("Test"); //this gets printed to console
I managed to simulate this bug either on windows and linux distribution of mono. The error happens all the time. The error does not happen, if I don't use pooling in connection string.
same here, using mono 4.0.4 got the same behaviour