Bug #66123 Attempt to open stored routine in DB model causes error--unable to cast object..
Submitted: 31 Jul 2012 15:45 Modified: 2 Aug 2012 16:12
Reporter: Robert Arkenin Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.41 OS:Microsoft Windows (Microsoft Windows XP Professional x64 Edition Service Pack 1 (build 3790))
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[31 Jul 2012 15:45] Robert Arkenin
Error on attempt to access some stored routines in DB model

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

MySQL Workbench CE for Windows version 5.2.41  revision 9727
Configuration Directory: C:\Documents and Settings\rarkenin\Application Data\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft Windows XP Professional x64 Edition Service Pack 1 (build 3790)
CPU: AMD Athlon(tm) Processor 2650e, 1.9 GiB RAM
Active video adapter (0): NVIDIA GeForce 6150SE nForce 430
Installed video RAM: 512 MB
Current video mode: 1440 x 900 x 4294967296 colors
Used bit depth: 32
Driver version:
Installed display drivers: nv4_disp.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:
Open DB model.
Double click on any rotuine, and copy DDL to buffer/clipboard
Add another routine, and paste, make changes

Double-click first routine.
Observe no action
Close document.
Open documant again, attempt to access failing routine.
Observe error.
[2 Aug 2012 16:12] Alfredo Kojima
Duplicate of bug #66013