Bug #66059 Table properties stop showing
Submitted: 27 Jul 2012 22:20 Modified: 28 Jul 2012 9:06
Reporter: Caio Cunha Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.41 OS:Windows (Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601), 32-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[27 Jul 2012 22:20] Caio Cunha
Description:
I was editing a diagram, created a new entity and immediatly deleted it (also deleting the underlaying entity). 

After that, I couldn't get the table properties openend. Closed the model, reopenend and got the error when double clicking the same entity.

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

MySQL Workbench CE for Windows version 5.2.41  revision 9727
Configuration Directory: C:\Users\Caio Cunha\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601), 32-bit
CPU: 2x Intel(R) Pentium(R) 4 CPU 3.20GHz, 2.0 GiB RAM
Active video adapter (0): NVIDIA GeForce 6200  
Installed video RAM: 256 MB
Current video mode: 1920 x 1080 x 4294967296 colors
Used bit depth: 32
Driver version: 8.17.12.9610
Installed display drivers: nvd3dum.dll
Current user language: Portuguese (Brazil)

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:
- couldn't repeat
[27 Jul 2012 22:48] Caio Cunha
Just figure out a way to make it reproducible.

1) open a new model;
2) add a table (using the "Place New Table" from toolbar);
3) double click it to edit and change its name;
4) create another table (from toolbar);
5) double click it;
6) don't change anything and double click the first table again.
7) close the table properties (notice that it didn't change to the first table)

From this moment on, it's only possible to open the first table properties. Double-click and right-click-edit-table didn't work also.
[27 Jul 2012 23:06] Caio Cunha
Just discovered that the problem is more serious than I thought.

To reproduce it, you just need to:

1) open a model;
2) double-click a table;
3) double-click another table;
4) double-click the first one again.

This will trigger the bug (don't change to the first and if you close properties  it will not open for the second table clicked).

If you close Workbench at this moment, a crash is reported. If you close the model (without close Workbench) and reopen, you get the error reported at the original message when you double-click the second message.

Restarting Workbench is the only available workaround for me.
[28 Jul 2012 9:06] Valeriy Kravchuk
This is a duplicate of bug #66013.