Bug #61367 Editor
Submitted: 1 Jun 2011 1:01 Modified: 31 Aug 2011 23:03
Reporter: Peter Hodges Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.34CE OS:Windows (Win 7, XP)
Assigned to: CPU Architecture:Any
Tags: exception on second SQL Editor to same schema, regression

[1 Jun 2011 1:01] Peter Hodges
Description:
Opening a second SQL Editor to the same server results in a "External component has thrown an exception" dialog.

MySQL version 5.5.8

How to repeat:
start workbench
Open 1st connection to server x
Open 2nd connection to server x

In 1st SQL Editor enter "use mydatabase"  - succeeds
In 2nd SQL Editor enter "use mydatabase" - fails with error dialog.

Suggested fix:
Used to work with earlier versions of Workbench. Still works if have open a 2nd connection to a different server then both editors are fine.
[1 Jun 2011 5:32] Valeriy Kravchuk
Thank you for the bug report. Verified on Windows XP. 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 Db_sql_editor.exec_sql(Db_sql_editor* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , shared_ptr<Sql_editor>* , Boolean , Boolean , Boolean )
   at MySQL.GUI.Workbench.Db_sql_editor.exec_sql(String sql, Boolean active_editor, Boolean wrap_with_non_std_delimiter)
   at MySQL.GUI.Workbench.DbSqlEditor.DoExecuteSqlScript(Boolean currentStatementOnly)
   at MySQL.GUI.Workbench.DbSqlEditor.ExecuteSqlScript()
   at MySQL.Grt.RunWrappedDelegate0<void\,void\,MySQL::Grt::DelegateSlot0<void\,void>::ManagedDelegate>.native_callback()
   at sigc.pointer_functor0<void>.()(pointer_functor0<void>* )
   at sigc.adaptor_functor<sigc::pointer_functor0<void> >.()(adaptor_functor<sigc::pointer_functor0<void> >* )
   at sigc.internal.slot_call0<sigc::pointer_functor0<void>,void>.call_it(slot_rep* rep)
   at mforms.ToolBarItem.callback(ToolBarItem* )
   at MySQL.Forms.ToolBarItemImpl.OnItemActivation(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.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)
[2 Jun 2011 11:20] Valeriy Kravchuk
Bug #61383 was marked as a duplicate of this one.
[29 Jun 2011 12:03] Gregory Thomas
This occurs when you open a connection to edit a table, and then try to open another table in MySQL Workbench version 5.2.34. You simply have to close any open tabs that have table results and named 'SQL Editor ...'.
[5 Jul 2011 11:29] Valeriy Kravchuk
Bug #61748 was marked as a duplicate of this one.
[5 Jul 2011 11:36] Emerson Herzeg
I'm using the latest version (2.5.34) on Windows 7 and the error still happens.
[6 Jul 2011 4:13] Alfredo Kojima
bug #61719 is a duplicate
[13 Jul 2011 13:26] Alfredo Kojima
bug #61851 is a duplicate
[31 Aug 2011 23:03] Philip Olson
Fixed as of 5.2.35:

+        On Microsoft Windows, a <guilabel>MySQL Workbench Unexpected
+        Error</guilabel> dialogue is generated when using two SQL Editor
+        windows each with their own database connection to the same
+        server.