Bug #66978 unable to cast object
Submitted: 27 Sep 2012 2:25 Modified: 27 Sep 2012 2:47
Reporter: Michael Tilelli Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.42 OS:Microsoft Windows (Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601), 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[27 Sep 2012 2:25] Michael Tilelli
unable to cast object of type 'MySQL.Forms.ToolBarItemImpl' to type 'MySQL.GUI.Workbench.Plugins.DockablePlugin'.

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

MySQL Workbench CE for Windows version 5.2.42  revision 9752
Configuration Directory: C:\Users\Tilellimjx\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.42
Cairo Version: 1.8.8
OS: Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601), 64-bit
CPU: 4x AMD Athlon(tm) II X4 630 Processor, 3.0 GiB RAM
Active video adapter (0): VMware SVGA 3D (Microsoft Corporation - WDDM)
Installed video RAM: 128 MB
Current video mode: 1600 x 900 x 4294967296 colors
Used bit depth: 32
Driver version:
Installed display drivers: vm3dum64.dll,vm3dum,vm3dgl64.dll,vm3dgl
Current user language: English (United States)

Exception = System.InvalidCastException
Message = Unable to cast object of type 'MySQL.Forms.ToolBarItemImpl' to type 'MySQL.GUI.Workbench.Plugins.DockablePlugin'.
FullText = System.InvalidCastException: Unable to cast object of type 'MySQL.Forms.ToolBarItemImpl' 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:
create some tables in the model. open the EER Diagram. Drag the tables onto the canvas. Double click on a table to see the tab show up across the bottom. Close it. Click on a different table to see it's properties in the tab window below. Sometimes switching back and forth works. Sometimes it doesn't. I was having trouble seeing the properties of some of the tables. I was creating foreign keys and associating them to the other tables. Hope this helps.
[27 Sep 2012 2:41] Miguel Solorzano
Please check with new version 5.2.43 is affected with this issue too. Thanks.
[27 Sep 2012 2:47] Michael Tilelli
The latest build fixed the issue. Thanks for the quick response!