Bug #66538 Unable to cast object of type MySQL.Forms.MenuItemImpl to type MySQL.GUI.Workben
Submitted: 25 Aug 2012 15:41 Modified: 25 Aug 2012 18:02
Reporter: Mircea Chirac Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.41 OS:Windows (Microsoft Windows 7 Home Premium Edition Service Pack 1 (build 7601), 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[25 Aug 2012 15:41] Mircea Chirac
Description:
Nothing special. Check "how to repeat".

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

MySQL Workbench CE for Windows version 5.2.41  revision 9724
Configuration Directory: C:\Users\Mirq\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.41
Cairo Version: 1.8.8
OS: Microsoft Windows 7 Home Premium Edition Service Pack 1 (build 7601), 64-bit
CPU: 4x Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz, 7.9 GiB RAM
Active video adapter (0): Intel(R) HD Graphics Family
Installed video RAM: -256 MB
Current video mode: 1920 x 1080 x 4294967296 colors
Used bit depth: 32
Driver version: 8.15.10.2559
Installed display drivers: igdumd64.dll,igd10umd64.dll,igd10umd64.dll,igdumdx32,igd10umd32,igd10umd32
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 wb.ModelDiagramForm.handle_mouse_double_click(ModelDiagramForm* , MouseButton , Int32 , Int32 , EventState )
   at MySQL.Workbench.ModelDiagramFormWrapper.OnMouseDoubleClick(MouseEventArgs e, Int32 X, Int32 Y, Keys keystate, MouseButtons buttons)
   at MySQL.GUI.Workbench.ModelDiagramForm.CanvasPanel_MouseDoubleClick(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e)
   at MySQL.Utilities.WindowsCanvasViewerPanel.OnMouseDoubleClick(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.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 created a new table (with columns: id and name), then I modified a foreign key to point to its id, then I tried to double click on the table to edit it again, but it didn't open. Then I closed the EER diagram and opened it again, and now I got this error.
[25 Aug 2012 17:37] Mircea Chirac
I restarted the workbench and then it worked.
[25 Aug 2012 18:02] Valeriy Kravchuk
This is a duplicate of bug #66013.