Bug #57053 MySQL Workbench Unexpected Error on closing SQL Editor
Submitted: 28 Sep 2010 7:57 Modified: 25 Nov 2010 18:24
Reporter: Blasio Muscat Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.28 Revision 6722 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[28 Sep 2010 7:57] Blasio Muscat
Description:
On closing an SQL Editor tab twice two Unexpected errors are shown:

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

and

"External component has thrown an exception."

Trying to open any SQL Editor tab after that results in an very long series of requesters showing the first error above.  After about 20 I killed workbench using task manager.  Closing Workbench immediately after the two errors will sometimes result in another "External component has thrown an exception." error.

Stack Trace for 1st error:

Exception = System.AccessViolationException
Message = Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
FullText = System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at boost.checked_delete<class Db_sql_editor>(Db_sql_editor* x)
   at boost.detail.sp_counted_impl_p<Db_sql_editor>.dispose(sp_counted_impl_p<Db_sql_editor>* )
   at boost.detail.sp_counted_base.release(sp_counted_base* )
   at boost.detail.shared_count.{dtor}(shared_count* )
   at boost.shared_ptr<Db_sql_editor>.{dtor}(shared_ptr<Db_sql_editor>* )
   at boost.shared_ptr<Db_sql_editor>.__delDtor(shared_ptr<Db_sql_editor>* , UInt32 )
   at MySQL.Grt.ManagedRef<Db_sql_editor>.reset()
   at MySQL.Grt.ManagedRef<Db_sql_editor>.~ManagedRef<Db_sql_editor>()
   at MySQL.Grt.ManagedRef<Db_sql_editor>.Dispose(Boolean )
   at MySQL.Grt.ManagedRef<Db_sql_editor>.Dispose()
   at MySQL.GUI.Workbench.Db_sql_editor.~Db_sql_editor()
   at MySQL.GUI.Workbench.Db_sql_editor.Dispose(Boolean )
   at MySQL.Grt.UIForm.Dispose()
   at MySQL.GUI.Workbench.DbSqlEditor.Destroy()
   at MySQL.GUI.Workbench.DbSqlEditor.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at System.Windows.Forms.Form.WmClose(Message& m)
   at System.Windows.Forms.Form.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)

Stack trace for 2nd error:

Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at MySQL.GUI.Workbench.Db_sql_editor.~Db_sql_editor()
   at MySQL.GUI.Workbench.Db_sql_editor.Dispose(Boolean )
   at MySQL.Grt.UIForm.Dispose()
   at MySQL.GUI.Workbench.DbSqlEditor.Destroy()
   at MySQL.GUI.Workbench.DbSqlEditor.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at System.Windows.Forms.Control.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at MySQL.Controls.FlatTabControl.CloseTabPage(TabPage page)
   at MySQL.Controls.FlatTabControl.OnMouseUp(MouseEventArgs 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.TabControl.WndProc(Message& m)
   at MySQL.Controls.FlatTabControl.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)

Stack trace for error on exit:

Exception = System.AccessViolationException
Message = Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
FullText = System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at wb.WBContextUI.finalize(WBContextUI* )
   at MySQL.Workbench.WbContext.finalize()
   at MySQL.GUI.Workbench.Program.Main(String[] Args)

System Info:

MySQL Workbench CE for Windows version 5.2.28
Data Directory: C:\Program Files\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.0.0
OS: Microsoft Windows XP Professional Service Pack 2 (build 2600)
CPU: 4x Intel(R) Core(TM)2 Quad  CPU   Q8200  @ 2.33GHz, 2.0 GiB RAM
Video adapter info:
Adapter type: NVIDIA GeForce 8400 GS   
Chip Type: GeForce 8400 GS
BIOS String: Version 62.98.5F.00.00
Video Memory: 524288 KB
Current user language: English (United Kingdom)

How to repeat:
1) Open an SQL Editor Tab by double-clicking an existing connection.
2) Close the tab.
3) Open another SQL Editor Tab by double-clicking an existing connection (doesn't have to be the same one).
4) Close the tab.
[28 Sep 2010 20:34] Johannes Taxacher
cannot repeat the problem on my win7/XP boxes
[28 Sep 2010 22:18] Alfredo Kojima
From the stack trace, it looks to be the same (or at least related) to bug #56963
[28 Sep 2010 23:41] MySQL Verification Team
I couldn't repeat on Vista Ultimate 64-bits too.
[7 Oct 2010 10:38] Tony Walker
Workbench 5.2.28CE on Windows XP SP3.
I loaded an existing SQL file, edited it, saved it, then attempted to close the SQL Editor, got this error exactly.
[13 Nov 2010 0:36] Alfredo Kojima
Does this still happen with 5.2.29?
[16 Nov 2010 9:08] Blasio Muscat
Not getting this error in 5.2.29.
[25 Nov 2010 18:24] Valeriy Kravchuk
Not repeatable with 5.2.29.