Bug #65182 MySQL Workbench crash when opening table in EER model when another table is open
Submitted: 2 May 2012 15:03 Modified: 27 Jul 2012 7:51
Reporter: Chris Ballester Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.39 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[2 May 2012 15:03] Chris Ballester
Description:
If an object properties is open, when you open another object, the program will crash.

Event Type:	Error
Event Source:	.NET Runtime
Event Category:	None
Event ID:	1026
Description:
Application: MySQLWorkbench.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
   at MySQL.Grt.ListModel.get_field(MySQL.Grt.NodeId, Int32, System.String ByRef)
   at MySQL.Grt.SimpleGrtListModel.ValueNeeded(System.Object, Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs)
   at Aga.Controls.Tree.NodeControls.BindableControl.OnValueNeeded(Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs)
   at Aga.Controls.Tree.NodeControls.BindableControl.GetValue(Aga.Controls.Tree.TreeNodeAdv)
   at Aga.Controls.Tree.NodeControls.BaseTextControl.GetLabel(Aga.Controls.Tree.TreeNodeAdv)
   at Aga.Controls.Tree.NodeControls.BaseTextControl.MeasureSize(Aga.Controls.Tree.TreeNodeAdv, Aga.Controls.Tree.DrawContext)
   at Aga.Controls.Tree.NodeControls.NodeControl.GetActualSize(Aga.Controls.Tree.TreeNodeAdv, Aga.Controls.Tree.DrawContext)
   at Aga.Controls.Tree.TreeViewAdv+<GetNodeControls>d__7.MoveNext()
   at Aga.Controls.Tree.TreeViewAdv+<GetNodeControls>d__0.MoveNext()
   at Aga.Controls.Tree.TreeViewAdv.GetNodeControlInfoAt(Aga.Controls.Tree.TreeNodeAdv, System.Drawing.Point)
   at Aga.Controls.Tree.TreeViewAdv.GetNodeControlInfoAt(System.Drawing.Point)
   at Aga.Controls.Tree.TreeViewAdv.CreateMouseArgs(System.Windows.Forms.MouseEventArgs)
   at Aga.Controls.Tree.TreeViewAdv.OnMouseDown(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseDown(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext)
   at MySQL.GUI.Workbench.Program.Main(System.String[])

How to repeat:
Open an object.  Open another object.  This almost always occurs when the privileges or columns tabs are selected.

Suggested fix:
Close any open objects before opening another.
[2 May 2012 18:37] Miguel Solorzano
I can't repeat using the Sakila model, please provide your project model file and describe which objects to open. THanks.
[2 May 2012 18:46] Chris Ballester
EER Model file

Attachment: LaserTesting.mwb (application/octet-stream, text), 50.86 KiB.

[2 May 2012 20:23] Miguel Solorzano
Please provide a screen-shot of both steps. Thanks.
[3 May 2012 13:49] Chris Ballester
Miguel,

The first step is opening a table.  The second step is opening a second table when the first is still open, but the program disappears without any error message.

Chris
[3 May 2012 17:57] Rafael Antonio Bedoy Torres
Hello Chris, I'm trying to reproduce on Win 7, is that the OS that you are using?
[3 May 2012 18:49] Chris Ballester
We are actually using Windows XP.
[4 May 2012 0:14] Jose Conesa
Hello,
it also happens opening a stored procedure and I work on windows 7 32 bits spanish. When you open a second stored procedure the program hangs up and closes itself. It always happens when open on the same tab, not when is opened on a new tab.

thanks
[11 May 2012 10:49] Valeriy Kravchuk
I can not reproduce on 32-bit Windows XP using .mwb file uploaded. Can you, please, specify on what exact tables you click to reproduce the crash?
[14 May 2012 14:36] Chris Ballester
I'll pick the top two on the left.  I can replicate this issue on at least two Windows XP 32-bit computers.

Double-click lasercosheader.  Click on privileges.  Now double-click lasercosburninspec.  My other machine crashes here.  You'll see the privileges tab will not be updated properly, so click any other tab and come back to privileges and the GUI will crash.

.NET runtime application error shows up in the application event log.

Application: MySQLWorkbench.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
   at MySQL.Grt.ListModel.get_field(MySQL.Grt.NodeId, Int32, System.String ByRef)
   at MySQL.Grt.SimpleGrtListModel.ValueNeeded(System.Object, Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs)
   at Aga.Controls.Tree.NodeControls.BindableControl.OnValueNeeded(Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs)
   at Aga.Controls.Tree.NodeControls.BindableControl.GetValue(Aga.Controls.Tree.TreeNodeAdv)
   at Aga.Controls.Tree.NodeControls.BaseTextControl.GetLabel(Aga.Controls.Tree.TreeNodeAdv)
   at Aga.Controls.Tree.NodeControls.BaseTextControl.MeasureSize(Aga.Controls.Tree.TreeNodeAdv, Aga.Controls.Tree.DrawContext)
   at Aga.Controls.Tree.NodeControls.NodeControl.GetActualSize(Aga.Controls.Tree.TreeNodeAdv, Aga.Controls.Tree.DrawContext)
   at Aga.Controls.Tree.TreeViewAdv+<GetNodeControls>d__f.MoveNext()
   at Aga.Controls.Tree.TreeViewAdv+<GetNodeControls>d__8.MoveNext()
   at Aga.Controls.Tree.TreeViewAdv.DrawNode(Aga.Controls.Tree.TreeNodeAdv, Aga.Controls.Tree.DrawContext)
   at Aga.Controls.Tree.TreeViewAdv.DrawRow(System.Windows.Forms.PaintEventArgs, Aga.Controls.Tree.DrawContext ByRef, Int32, System.Drawing.Rectangle)
   at Aga.Controls.Tree.TreeViewAdv.OnPaint(System.Windows.Forms.PaintEventArgs)
   at System.Windows.Forms.Control.PaintWithErrorHandling(System.Windows.Forms.PaintEventArgs, Int16)
   at System.Windows.Forms.Control.WmPaint(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Wind
[27 Jul 2012 7:51] Philip Olson
Fixed as of Workbench 5.2.41, and here's the changelog entry:

An orphaned privileges tab would be shown in the table editor
when switching tables. Now only the current privilege tab is
displayed.