Bug #63056 Workbench crashes when altering a table that has rows in inserts tab
Submitted: 1 Nov 2011 12:40 Modified: 9 Feb 2012 20:36
Reporter: Eric Kent Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.35 CE Rev 7915 OS:Windows (Windows 7)
Assigned to: CPU Architecture:Any

[1 Nov 2011 12:40] Eric Kent
I added two sample rows to a table in the inserts tab in workbench model (not in the database itself).
I later modified the data type of a column in the table from int to tinyint.
The workbench immediately crashed, as soon as I pressed enter in the datatype column.
The workbench exception dialog did not appear, just the windows crash dialog.
The data in the sample rows' column was between 1 and 10.

I then tried to delete a column in the same table, and the same thing happened.
I then deleted the rows in the inserts tab, and committed the change.
The same thing happened when attempting to change the datatype.
I restarted the workbench, deleted the rows, saved, then exited workbench.
I again restarted the workbench, and was able to successfully change the datatype.

I created a small sample database model to test this.
It has a single table with 5 columns.
I added a row in the inserts tab.
I was able to modify the datatype without any problem.
I then added a diagram and added the table to the diagram.
When I double clicked on the table in the diagram, the workbench crashed in the same way.


System Info:

MySQL Workbench CE for Windows version 5.2.35
Configuration Directory: C:\Users\Eric\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
Rendering Mode: OpenGL is available on this system, so OpenGL is used for rendering.
OpenGL Driver Version: 3.1.0 - Build
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, 3.9 GiB RAM
Active video adapter: Intel(R) HD Graphics Family
Installed video RAM: 1813 MB
Current video mode: 1366 x 768 x 4294967296 colors
Used bit depth: 32
Driver version:
Installed display drivers:
Current user language: English (United States)

How to repeat:
any change to a table that has rows in inserts will cause this.

Suggested fix:
A work around is to delete any rows, and then exit the workbench, and then reload it before making any changes.  Simply deleting the rows, without exiting, still causes the crash.
[1 Nov 2011 12:56] Valeriy Kravchuk
I've got a crash when tried to delete row from the table after altering data type. Stack trace is:

Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at MySQL.Grt.Db.Recordset.get_popup_menu_items(List`1 rows, Int32 column)
   at MySQL.GUI.Workbench.SqlIdeMenuManager.OnMenuOpening(Object sender, CancelEventArgs e)
   at System.Windows.Forms.ToolStripDropDown.OnOpening(CancelEventArgs e)
   at System.Windows.Forms.ToolStripDropDown.SetVisibleCore(Boolean visible)
   at System.Windows.Forms.ContextMenuStrip.SetVisibleCore(Boolean visible)
   at System.Windows.Forms.ToolStripDropDown.Show(Control control, Point position)
   at System.Windows.Forms.ContextMenuStrip.ShowInternal(Control source, Point location, Boolean isKeyboardActivated)
   at System.Windows.Forms.DataGridView.WmContextMenu(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.DataGridView.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)
[9 Feb 2012 20:36] Philip Olson
Fixed as of 5.2.38:

On Microsoft Windows, changing or deleting a row or column
within a model, could cause a crash.