Bug #69329 MySQL Workbench crashes on attempt to close Manage Stored Connections window
Submitted: 27 May 2013 20:06 Modified: 31 Jul 2013 14:54
Reporter: Roman Syroeshko Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.47 OS:Windows (7 Home Basic 64-bit)
Assigned to: CPU Architecture:Any
Tags: reverse engineering, stored connections, unable to cast, workbench

[27 May 2013 20:06] Roman Syroeshko
Description:
MySQL Workbench crashes on attempt to close Manage Stored Connections window opened in the beginning of database reverse engineering process.

How to repeat:
1. Open Workbench.
2. Open existing connection (e.g. "localhost") for queueing DB.
3. Expand your schema tree and with help of context menu and create new table with name "a" and PK NOT NULL field "ida". Apply all changes.
4. Then go to "Database" menu and click "Reverse engineer".
5. Make sure that your earlier choosen "localhost" connection is absent in the "Stored Connection" dropdown.
6. Choose "Manage Store Connections" in the "Stored Connection" dropdown.
7. Select your "localhost" connection and click "Test" (or "Test connection") button.
8. Make sure that you got message ".. connection parameters are correct... blah... blah... blah".
9. Click "Close" button and get application crashed with error.
[27 May 2013 20:10] Roman Syroeshko
Error report screenshot.

Attachment: 69329_error_report_screen.png (image/png, text), 51.92 KiB.

[27 May 2013 20:36] MySQL Verification Team
Thank you for the bug report.

Exception = System.InvalidCastException
Message = Unable to cast object of type 'MySQL.Forms.SeparatorItem' to type 'System.String'.
FullText = System.InvalidCastException: Unable to cast object of type 'MySQL.Forms.SeparatorItem' to type 'System.String'.
   at MySQL.Forms.SelectorImpl.get_item(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , Selector* self, Int32 index)
   at MySQL.MCallback2<std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,mforms::Selector \*\,int>.cpp_callback(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , Selector* a1, Int32 a2)
   at mforms.Selector.callback(Selector* )
   at MySQL.Forms.SelectorImpl.selection_changed(Object sender, EventArgs e)
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ComboBox.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[31 Jul 2013 14:54] Philip Olson
Fixed as of MySQL Workbench 6.0.4, and here's the changelog entry:

Connection handling was refactored. All defined connections are now
listed, when before only "stored" connections were shown. Additionally, the last
used connection is now highlighted by default. 

This also solves a problem where the connection manager window could crash 
when it was closed.

Thank you for the bug report.