Bug #66699 Unable to cast object of type 'MySQL.Forms.MenuItemImpl' to type 'MySQL.GUI.Work
Submitted: 5 Sep 2012 1:37 Modified: 6 Sep 2012 5:12
Reporter: John Russell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.42 OS:Windows (Microsoft Windows 7 Home Premium Edition Service Pack 1 (build 7601), 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[5 Sep 2012 1:37] John Russell
Description:
I had on-going problems trying to edit a table definition after moving on. Double clicking or right-clicking and selected "edit" worked sometimes and did not work other times. (VERY buggy.) Eventually, after working on an EER diagram, then closing it, when I double clicked on one of the tables, I got an exception. I was working in a new database, creating the first tables. Only 3 tables had been created, and I was trying to establish foreign keys between the tables. (They are all set up as innodb tables.)

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

MySQL Workbench CE for Windows version 5.2.42  revision 9752
Configuration Directory: C:\Users\john\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft Windows 7 Home Premium Edition Service Pack 1 (build 7601), 64-bit
CPU: 4x AMD Athlon(tm) II X4 635 Processor, 3.8 GiB RAM
Active video adapter (0): ATI Radeon HD 4200 
Installed video RAM: 256 MB
Current video mode: 1920 x 1080 x 4294967296 colors
Used bit depth: 32
Driver version: 8.733.0.0
Installed display drivers: aticfx64.dll,aticfx64.dll,aticfx32,aticfx32,atiumd64.dll,atidxx64.dll,atiumdag,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll
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:
See above.
[5 Sep 2012 12:46] MySQL Verification Team
Thank you for the bug report. This looks duplicate of http://bugs.mysql.com/bug.php?id=66538 which is duplicate of http://bugs.mysql.com/bug.php?id=66013 which is already closed,

Same callstack.
[5 Sep 2012 14:06] Mike Lischke
There are two places where this problem can occur. Only one has been fixed so far.
[5 Sep 2012 16:55] Alfredo Kojima
Bug #66571
Bug #66486
Bug #66449
Bug #66610
are duplicate of this
[6 Sep 2012 5:12] Philip Olson
Fixed as of the upcoming Workbench 5.2.43, and here's the changelog entry:

 After editing and closing an EER diagram, double-clicking on one
 of the diagram tables could generate an exception. 

Thank you for the report.