Bug #61697 Workbench Crashes Without Error Message
Submitted: 29 Jun 2011 17:29 Modified: 30 Jul 2011 10:28
Reporter: Chris Rife Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.34 OS:Linux (Mint 11 x64)
Assigned to: CPU Architecture:Any
Tags: crash, fk, foreign key, workbench

[29 Jun 2011 17:29] Chris Rife
Description:
What I Do:
Attempt to create a Foreign Key reference using "Create Table" dialog or "Alter Table" dialog from one table to another within the same database schema.

What I Get:
Workbench closes immediately with no indication of why, nor any system freeze (as if a TERMSIGNAL was sent to the application)

This only happens when using a connection to the Ubuntu Server database
Server:  MySQL
Version: 5.1.54-1ubuntu4
User:    root
...when using the connection to Windows Small Business Server
Server:  MySQL
Version: 5.1.47-community
User:    root
...the application works as expected.

performing the Foreign Key reference creation manually works through the script editor and executing.  

How to repeat:
1. Establish a connection to a mysql instance running version 5.1.54-1ubuntu4
2. Create a table t1 with column1 PK smallint
3. Use GUI "Create Table" to add another table t2 and make a foreign key column referencing PK in t1.
4. After naming the foreign key, attempt to choose t1 from the combo box.
5. Application closes.

Suggested fix:
I'm sorry, I do not know.  I cannot find any logs with data, nor does an error dialog appear.  

I am only reporting this to bring it to your attention.  The creation of foreign keys using a GUI is handy, but can still be done using scripts.
[29 Jun 2011 20:01] Chris Rife
Update, tried this on a Windows 7 Professional x64 laptop install of Workbench 5.2.33 CE rev 7508

I got the same result as with the Linux install of Workbench listed above.

On my Windows box, however, Visual Studio 2010 kicked in and offered a debug.  I was able to obtain the following data:

--start file /bug61697stackTrace.txt
System.AccessViolationException was unhandled

  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

  Source=wbpublic.wr

  StackTrace:

       at bec.FKConstraintListBE.select_fk(FKConstraintListBE* , NodeId* )

       at MySQL.Grt.Db.FKConstraintListBE.select_fk(NodeId node)

       at MySQL.GUI.Workbench.Plugins.DbMysqlTableEditor.fkTreeView_SelectionChanged(Object sender, EventArgs e)

       at Aga.Controls.Tree.TreeViewAdv.OnSelectionChanged()

       at Aga.Controls.Tree.TreeViewAdv.set_SuspendSelectionEvent(Boolean value)

       at Aga.Controls.Tree.NormalInputState.DoMouseOperation(TreeNodeAdvMouseEventArgs args)

       at Aga.Controls.Tree.NormalInputState.MouseDown(TreeNodeAdvMouseEventArgs args)

       at Aga.Controls.Tree.TreeViewAdv.OnMouseDown(MouseEventArgs e)

       at System.Windows.Forms.Control.WmMouseDown(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)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.Run(ApplicationContext context)

       at MySQL.GUI.Workbench.Program.Main(String[] Args)

  InnerException: null
---end file

I hope this helps.

Thank you.
[30 Jun 2011 10:28] Valeriy Kravchuk
What exact name you set for the foreign key (case matters)?
[30 Jul 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".