Bug #44051 Workbench crashed when exiting Edit-Table window
Submitted: 2 Apr 2009 19:46 Modified: 9 Jun 2009 6:44
Reporter: Edmund Mierzwa Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.30 OSS OS:Windows (XP SP2)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: CHECKED, workbench crash auto_increment edit table

[2 Apr 2009 19:46] Edmund Mierzwa
Description:
When exiting the "Edit Table" window, Workbench crashes and or gets an unhandled exception for certain tables. This only happens when I edit the table from the EER Diagram view, not the MySQL Model view.

How to repeat:
From the EER Diagram view I had edited three tables (fail_attrs, perf_attrs & power_attrs) by removing an AUTO_INCREMENT key word from their respective (fail_id, perf_id & power_id) columns and saved the changes. Now, if you try to "Edit Table" table "fail_attrs" from EER Diagram view named (ssd_pg2) by right-mouse on the "fail_attrs" table and click "Edit Table", then just close the "Edit Table" by clicking the X. The app generates an exception. Prior to removing the AUTO_INCREMENT key words I had no problems with this model.

Suggested fix:
Correct unhandled exception.
[2 Apr 2009 19:48] Edmund Mierzwa
model file

Attachment: ssd.mwb (application/octet-stream, text), 31.52 KiB.

[2 Apr 2009 19:49] Edmund Mierzwa
before crash

Attachment: before_crash.JPG (image/jpeg, text), 180.35 KiB.

[2 Apr 2009 19:50] Edmund Mierzwa
after crash

Attachment: after_crash.JPG (image/jpeg, text), 180.07 KiB.

[2 Apr 2009 22:19] MySQL Verification Team
Thank you for the bug report. I couldn't repeat following your instructions, could you please provide the output of Help->System Info?. Thanks in advance.
[3 Apr 2009 0:58] Edmund Mierzwa
Looking for user plugins in C:\Documents and Settings\emierzwa\Application Data\MySQL\Workbench\modules
Looking for user plugins in C:\Documents and Settings\emierzwa\Application Data\MySQL\Workbench\plugins
MySQL Workbench OSS for Windows version 5.0.30
Cairo Version: 1.5.12
Rendering Mode: GDI Rendering
OpenGL Driver Version: Not Detected
OS: Windows XP
CPU: Intel(R) Pentium(R) 4 CPU 2.60GHz, 2.0 GB RAM
Video adapter info:
Adapter type: NVIDIA GeForce FX 5900XT
Chip Type: GeForce FX 5900XT
BIOS String: Version 4.35.20.38.65
Video Memory: 131072 KB
[4 Apr 2009 15:18] Edmund Mierzwa
I tried this moddel on my home pc. It took a little more clicking around but it crashed as well...although a little differently. I will add the exception jpg. Here is the following detail help info:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at MySQL.Grt.TreeModel.expand_node(NodeId node)
   at MySQL.Grt.GrtTreeModel.TreeViewExpanding(Object sender, TreeViewAdvEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Aga.Controls.Tree.TreeViewAdv.OnExpanding(TreeNodeAdv node)
   at Aga.Controls.Tree.TreeViewAdv.SetIsExpanded(TreeNodeAdv node, Boolean value)
   at Aga.Controls.Tree.TreeViewAdv.SetIsExpanded(ExpandArgs eargs)
   at Aga.Controls.Tree.TreeViewAdv.SetIsExpanded(TreeNodeAdv node, Boolean value, Boolean ignoreChildren)
   at Aga.Controls.Tree.TreeViewAdv.SetIsExpandedRecursive(TreeNodeAdv root, Boolean value)
   at Aga.Controls.Tree.TreeViewAdv.SetIsExpanded(ExpandArgs eargs)
   at Aga.Controls.Tree.TreeViewAdv.SetIsExpanded(TreeNodeAdv node, Boolean value, Boolean ignoreChildren)
   at Aga.Controls.Tree.TreeNodeAdv.SetIsExpanded(Boolean value, Boolean ignoreChildren)
   at Aga.Controls.Tree.TreeNodeAdv.ExpandAll()
   at MySQL.GUI.Workbench.ModelLayerForm.expandImportantNodes()
   at MySQL.GUI.Workbench.ModelLayerForm.SetViewTreePath(String path)
   at MySQL.GUI.Workbench.MainForm.mainDockPanel_ActiveDocumentChanged(Object sender, EventArgs e)
   at WeifenLuo.WinFormsUI.Docking.DockPanel.OnActiveDocumentChanged(EventArgs e)
   at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.RefreshActiveWindow()
   at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.ResumeFocusTracking()
   at WeifenLuo.WinFormsUI.Docking.DockPanel.ResumeLayout(Boolean performLayout, Boolean allWindows)
   at WeifenLuo.WinFormsUI.Docking.DockPane.CloseContent(IDockContent content)
   at WeifenLuo.WinFormsUI.Docking.DockPane.CloseActiveContent()
   at WeifenLuo.WinFormsUI.Docking.VS2005DockPaneStrip.Close_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs 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.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)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
MySQLWorkbench
    Assembly Version: 5.0.30.3384
    Win32 Version: 5.0.30.3384
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLWorkbench.exe
----------------------------------------
wb.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/wb.wr.DLL
----------------------------------------
grt.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/grt.wr.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
MySQLCsUtilities
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLCsUtilities.DLL
----------------------------------------
msvcm80
    Assembly Version: 8.0.50727.3053
    Win32 Version: 8.00.50727.3053
    CodeBase: file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca/msvcm80.dll
----------------------------------------
MySQLGrtShell
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLGrtShell.EXE
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly Version: 2.2.3335.29009
    Win32 Version: 2.2.0.0
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/WeifenLuo.WinFormsUI.Docking.DLL
----------------------------------------
MySQLWorkbenchEditors
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLWorkbenchEditors.DLL
----------------------------------------
Aga.Controls
    Assembly Version: 1.6.0.0
    Win32 Version: 1.6.0.0
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/Aga.Controls.DLL
----------------------------------------
grt.helpers.be
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/grt.helpers.be.DLL
----------------------------------------
db.mysql.editors.wbp.fe
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/db.mysql.editors.wbp.fe.DLL
----------------------------------------
db.mysql.editors.wbp.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/db.mysql.editors.wbp.wr.DLL
----------------------------------------
grt.db.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/grt.db.wr.DLL
----------------------------------------
ScintillaNet
    Assembly Version: 2.0.3335.28741
    Win32 Version: 2.0.0.0
    CodeBase: file:///c:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/ScintillaNet.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
[4 Apr 2009 15:20] Edmund Mierzwa
different pc, different crash

Attachment: different_error.JPG (image/jpeg, text), 140.48 KiB.

[6 Apr 2009 15:36] MySQL Verification Team
back trace

Attachment: bug44051.txt (text/plain), 6.36 KiB.

[6 Apr 2009 15:38] MySQL Verification Team
Thank you for the feedback. Now I was able to repeat (attached file with backtrace).
[5 Jun 2009 9:42] Mike Lischke
I cannot reproduce this problem, not even with the provided model file. However, there has been quite a large overhaul of the internal handling in version 5.1, so it is much less likely to see such a problem again (if at all). Since we want to replace 5.0 by 5.1 we rather focus on 5.1 and fix any problems there. So, please try your model etc. in 5.1 (either the beta or the RC which is due soon) and let us know if that works for you then. Thank you.
[8 Jun 2009 14:39] Edmund Mierzwa
Trying 5.1 BETA seems to of resolved the problem. I tried 5.2 ALPHA as well, it too seems to of resolved the problem. Lets consider this resolved.

Thanks, Ed
[9 Jun 2009 6:44] Mike Lischke
Thank you. Closing this report as the problem appears to be fixed (WB 5.1 and newer).