Bug #71501 unable to cast object of the type mysql.forms.seperationitem to type system stri
Submitted: 28 Jan 2014 14:31 Modified: 14 May 2014 5:25
Reporter: the cupu Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.0.9 OS:Windows (WIN 7 64bit sp1)
Assigned to: CPU Architecture:Any

[28 Jan 2014 14:31] the cupu
Description:
this is just a little bug

How to repeat:
open model WB
1. use sync with any source
2. set source-DATABASE to model schemata
3. set destination-database to live database server
4. in stored connection set managed stored connection
5. there is new open window
6. make a new connection
7. delete your new connection and press directly close (DO NOT MOVE YOUR TRANSFER FOCUS OR SELECT ANY CONNECTION)
8 and you will get error
unable to cast object of the type mysql.forms.seperationitem to type system string

9. after got this bug, there is no opened window if i select managed stored connection

Suggested fix:
after delete a connection, hide the button close until selected/focus a connection
[28 Jan 2014 14:39] the cupu
LOG

22:26:02 [INF][      Workbench]: UI is up
22:26:03 [INF][      Workbench]: Running the application
22:26:05 [INF][ Canvas backend]: Found OpenGL version for this view: 4.3.12618 Compatibility Profile Context 13.251.0.0
22:26:42 [INF][     SSH tunnel]: Starting tunnel
22:26:43 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: Can't connect to MySQL server on '127.0.0.1' (10061)exception in grt execute_task, continuing: Exception: Can't connect to MySQL server on '127.0.0.1' (10061)Unable to cast object of type 'MySQL.Forms.SeparatorItem' to type 'System.String'.
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)
[9 Feb 2014 12:48] the cupu
6.0.9 still same problem
[12 Feb 2014 15:06] Alfredo Kojima
Could you try 6.1?
[14 May 2014 5:25] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.6 release, and here's the changelog entry:

Adding and then immediately deleting the same MySQL connection from within 
the "Synchronize With Any Source" wizard would emit an error such as "Unable 
to cast object of the type mysql.forms.seperationitem to type system string."

Thank you for the bug report.