Bug #66133 Crash after adding column to table and viewing inserts
Submitted: 1 Aug 2012 1:29 Modified: 1 Aug 2012 12:23
Reporter: Ben Lambell Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (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

[1 Aug 2012 1:29] Ben Lambell
Description:
When editing my mySQL model file, the workbench crashes if a column is added to a table (with the NOT NULL attirbute and no default value) and I attempt to view inserts for that table (with pre-existing rows).

After attempting to reproduce the problem, other errors started occuring (such as being unable to create columns, new column names disappearing) - I suspect this bug is corrupting the model (either the file or its representation in memory)

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

MySQL Workbench CE for Windows version 5.2.41  revision 9727
Configuration Directory: C:\Users\Benjamin\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: 2x AMD A4-3300M APU with Radeon(tm) HD Graphics, 3.5 GiB RAM
Active video adapter (0): AMD Radeon HD 6400M Series
Installed video RAM: 1024 MB
Current video mode: 1366 x 768 x 4294967296 colors
Used bit depth: 32
Driver version: 8.930.0.0
Installed display drivers: aticfx64.dll,aticfx64.dll,aticfx64.dll,aticfx32,aticfx32,aticfx32,atiumd64.dll,atidxx64.dll,atidxx64.dll,atiumdag,atidxx32,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll
Current user language: English (Australia)

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:
I have had multiple crashes after modifying tables and viewing inserts for them. I believe (but am not certain) the bug can be replicated by:

Add an insert to a table in a model
Add a row (NOT NULL, TINYINT(3))
Click on the inserts tab

I can provide the model file if required
[1 Aug 2012 1:39] Ben Lambell
I should note - this error report was triggered by an exception while I was trying to reproduce the bug actually being described. Ie, the stack trace isn't directly related to the bug I'm describing, although it shows the right system info.

I'm fairly sure the exception was indirectly caused by the bug.
[1 Aug 2012 2:16] Ben Lambell
Ah, okay, I have successfully reproduced the bug (I think).

Download my model file from http://tensitygames.com/EWE.mwb and put it in the workbench.

Perform the following:

 - Open the model
 - Edit the table `security` and add the following columns:
    - x (TINYINT, NOT NULL)
    - y (TINYINT, NOT NULL, DEFAULT 2)
 - Save the model file
 - Click on the 'inserts' tab to view inserted rows in `security`
 - Double click on the 'itemtype' table
 - Close the table
 - Double click on the security table
 - Double click on the itemtype table, twice (it will not open)
 - Right click on the itemtype table and select 'edit table', three times (it will not open)
 - Right click on the itemtype table and select 'edit table in new window' (it will not open)
 - Close the model
 - Close the workbench
 - Open the workbench. It will fail to launch, stating "Failed to read from an IPC Port: The pipe has ended"

Sorry for the convoluted directions, they are the best I could come up with to reproduce the error (I'm not really that experienced)
[1 Aug 2012 4:17] Valeriy Kravchuk
Looks like a duplicate/kind of bug #66013. Please, check.
[1 Aug 2012 7:52] Ben Lambell
Ah, I think you're right, what I've managed to replicate here is bug #66013.

I'm not sure whether the other crashes I've had are related to #66013 or not, but in any case, I haven't been able to replicate them, so I'm going to assume they are.

Thanks for the quick response. I suggest someone delete this report or mark it as closed, whichever is appropriate (I don't know).
[1 Aug 2012 12:23] MySQL Verification Team
Thank you for the feedback. Duplicate of http://bugs.mysql.com/bug.php?id=66013.