Bug #68522 Dim As New MySqlConnection throws exception
Submitted: 28 Feb 2013 12:08 Modified: 7 Apr 2013 8:11
Reporter: Khaled EL-Gamily Email Updates:
Status: No Feedback Impact on me:
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.6.5 OS:Microsoft Windows (7 64-bit VS2012 .Net Framework 4.5)
Assigned to: Uma Hoysala CPU Architecture:Any
Tags: MySqlConnection, VB.NET, VS2012

[28 Feb 2013 12:08] Khaled EL-Gamily
I have a VB.NET application (Windows Forms Project)running on :
* Windows 7 64-bit
* Visual Studio 2012
* .Net Framework 4.5
* MySQL Server 5.6.10
* MySqlConnect Net 6.6.5

I noticed the following:

1. If MySqlConnection is declared as :
   Dim con as MySqlConnection
   No problemo at all when debugging my code.


2. If MySqlConnection is declared as :
   Dim myConString As String = "server=localhost;uid=root;pwd=123;database=mysql;"
   Dim con As New MySqlConnection(myConString)

an first-time exception is thrown (details below) which is reported in the 'Immediate Window' of the VS2012. 

However, if I disable 'Managed Debugging Assistant' Exceptions setting in VS2012, still the exception is thrown but the application run successfully and VS2012
continue to report the exception errors every time I have
Dim As New MySqlConnection statement in my app !

When I enabled 'Managed Debugging Assistant' in Exceptions setting, the app breaks when faced with 'Dim As New MySqlConnection'

Below are some info VS2012 debug reported :

Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'C:\Users\Khaled\Documents\Visual Studio 2012\Projects\TradingAnalysis\TradingAnalysis\bin\x64\Debug\TradingAnalysis.exe'.
Additional Information: The runtime has encountered a fatal error. The address of the error was at 0xe85e39de, on thread 0x1598. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
If there is a handler for this exception, the program may be safely continued.

When I press continue this error appears:

An unhandled exception of type 'System.ExecutionEngineException' occurred in System.Data.dll

System.Data.dll!Bid.Bid() + 0x49 bytes
[Native to Managed Transition]
System.Data.dll!System.Data.Common.DbConnectionStringBuilder.Clear() + 0x25 bytes	 	  	 MySql.Data.dll!MySql.Data.MySqlClient.MySqlConnectionStringBuilder.Clear() + 0x62 bytes
MySql.Data.dll!MySql.Data.MySqlClient.MySqlConnectionStringBuilder.MySqlConnectionStringBuilder() + 0x96 bytes
MySql.Data.dll!MySql.Data.MySqlClient.MySqlConnection.MySqlConnection() + 0x57 bytes

Could you please advise for a solution.



How to repeat:
it repeats whenever my application have Dim As New MySqlConnection
[7 Mar 2013 8:11] Uma Hoysala
Thank you for the report.

Do you have a repeatable test case which could reproduce this issue? Please let us know.
[8 Apr 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".