Bug #66341 unexpected casting problem
Submitted: 12 Aug 2012 21:50 Modified: 13 Aug 2012 3:22
Reporter: Brant Gurganus Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.41 OS:Windows (Microsoft (build 8400), 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[12 Aug 2012 21:50] Brant Gurganus
Description:
There was an unexpected casting problem  opening a table to be edited in a workbench file where index and foreign key names are duplicate. Unable to case object of type 'MySQL.Forms.MenuItemImpl' to type 'MySQL.GUI.Workbench.Plugins.DockablePlugin'.

----- Developer Notes -----

MySQL Workbench CE for Windows version 5.2.41  revision 9727
Configuration Directory: C:\Users\Brant\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft  (build 8400), 64-bit
CPU: 8x Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz, 15.9 GiB RAM
Current user language: English (United States)

Exception = System.InvalidCastException
Message = Unable to cast object of type 'MySQL.Forms.MenuItemImpl' to type 'MySQL.GUI.Workbench.Plugins.DockablePlugin'.
FullText = System.InvalidCastException: Unable to cast object of type 'MySQL.Forms.MenuItemImpl' to type 'MySQL.GUI.Workbench.Plugins.DockablePlugin'.
   at MySQL.GUI.Workbench.Plugins.DockablePlugin.GetFromFixedPtr(IntPtr ptr)
   at MySQL.GUI.Workbench.MainForm.ShowPlugin(IntPtr ptr)
   at MySQL.Forms.AppImpl.show_editor_wrapper(UInt32 native_handle)
   at boost.detail.function.void_function_invoker1<void (__cdecl*)(unsigned int),void,unsigned int>.invoke(function_buffer* function_ptr, UInt32 a0)
   at MySQL.Grt.ListModel.activate_node(NodeId node)
   at MySQL.GUI.Workbench.ModelOverviewForm.listViewDoubleClick(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
   at System.Windows.Forms.ListView.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)

How to repeat:
I am not yet sure if this is reproducable. All I did was open the workbench file, ignore fixing the index names, and open a table's schema to edit.
[13 Aug 2012 3:22] Alfredo Kojima
Dup of bug #66013