Bug #56034 MySQL Workbench has encountered a problem (on syntax check)
Submitted: 16 Aug 2010 21:53 Modified: 1 Dec 2011 18:34
Reporter: Guus Leeuw Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.26 CE, 5.2.28, 5.2.33 OS:Windows (7 64b)
Assigned to: CPU Architecture:Any

[16 Aug 2010 21:53] Guus Leeuw
Description:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

We are sorry for the inconvenience but an unexpected exception has been raised by one of the MySQL Workbench modules. In order to fix this issue we would kindly ask you to file a bug report. You can do that by pressing the [Report Bug] button below. 

Please make sure to include a detailed description of your actions that lead to this problem.

Thanks a lot for taking the time to help us improve MySQL Workbench!

The MySQL Workbench Team

How to repeat:
Don't know whether this is repeatable... Stopping and restarting the Workbench doesn't bring this back...

It would be helpful to you and me, if Workbench could incorporate some sort of crash manager which creates a dump file that can then be used for debugging...
[21 Aug 2010 1:50] Roel Van de Paar
The next time this happens, please copy a stack trace for us as follows:

In the "MySQL Workbench Unexpected Error" popup window, right-click on "MySQL Workbench has encountered a problem" (or on the error message directly below it), and select "Copy stack trace to clipboard". Then paste (CTRL+V) it into a comment in this bug.
[21 Aug 2010 1:50] Roel Van de Paar
Are you monitoring remote servers? (using VPN/SSH/...)?
[21 Aug 2010 7:00] Guus Leeuw
Yes, this is a remote server. Thanks for the hint re stack trace.
[22 Aug 2010 20:05] Roel Van de Paar
Could you specify what sort of a remote connection (type (ssh, vpn,...), speed,...)?
[23 Aug 2010 6:26] Guus Leeuw
It's a direct connection to a server in the US from the UK. ping latency is 135ms avg across 4 samples, min=126ms, max=153.
[30 Aug 2010 1:54] Roel Van de Paar
Do you mean a leased line? If not, how is the connection established (through a VPN tunnel, ... ?)
[30 Aug 2010 6:05] Guus Leeuw
No, Roel. It's a normal internet connection from a static IP to a iptabled MySQL server that lets my static IP go through.
[8 Sep 2010 16:15] Yvan Rodrigues
I accidentally reproduced this. In Object Browser I right-clicked a stored procedure and this message popped up. The previous operation was I dropped a SP. I'm using 5.2.26 CE on Windows 7/x64.

The stack trace is:
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 MySQL.Grt.ListModel.get_popup_items_for_nodes(List`1 nodes)
   at MySQL.GUI.Workbench.SqlIdeMenuManager.OnMenuOpening(Object sender, CancelEventArgs e)
   at System.Windows.Forms.ToolStripDropDown.OnOpening(CancelEventArgs e)
   at System.Windows.Forms.ToolStripDropDown.SetVisibleCore(Boolean visible)
   at System.Windows.Forms.ContextMenuStrip.SetVisibleCore(Boolean visible)
   at System.Windows.Forms.ToolStripDropDown.Show(Control control, Point position)
   at System.Windows.Forms.ContextMenuStrip.ShowInternal(Control source, Point location, Boolean isKeyboardActivated)
   at System.Windows.Forms.Control.WmContextMenu(Message& m, Control sourceControl)
   at System.Windows.Forms.Control.WmContextMenu(Message& m)
   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)
[8 Sep 2010 16:46] Yvan Rodrigues
When I closed the crash message the application remained open, but further attempts to right-click on SPs have the same result. Note however that I cam able to right click on tables without the crash.

After restarting the application I am able to reproduce the issue by altering and dropping some SPs (between 3 and 6). Here is a another trace:

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 MySQL.Grt.ListModel.get_popup_items_for_nodes(List`1 nodes)
   at MySQL.GUI.Workbench.SqlIdeMenuManager.OnMenuOpening(Object sender, CancelEventArgs e)
   at System.Windows.Forms.ToolStripDropDown.OnOpening(CancelEventArgs e)
   at System.Windows.Forms.ToolStripDropDown.SetVisibleCore(Boolean visible)
   at System.Windows.Forms.ContextMenuStrip.SetVisibleCore(Boolean visible)
   at System.Windows.Forms.ToolStripDropDown.Show(Control control, Point position)
   at System.Windows.Forms.ContextMenuStrip.ShowInternal(Control source, Point location, Boolean isKeyboardActivated)
   at System.Windows.Forms.Control.WmContextMenu(Message& m, Control sourceControl)
   at System.Windows.Forms.Control.WmContextMenu(Message& m)
   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)
[9 Sep 2010 3:04] MySQL Verification Team
Please try version 5.2.27. Thanks in advance.
[10 Sep 2010 23:04] Yvan Rodrigues
I'm unable to reproduce this in 5.2.27.
[20 Sep 2010 9:02] Valeriy Kravchuk
All reporters,

Please, check if this is still repeatable for you with a recent version, 5.2.28.
[26 Sep 2010 10:40] Carlos Silva
This was happening to me sporadically in 5.2.27.
I just updated to 5.2.28 and same thins is occurring.
This happened right after updating Workbench, while editing a query in SQL Editor, and after running 1 simple query.
After this error occurs, the correspondent tab becomes all grey but it is still possible, for example, to do "Save As" and I believe it saved the last changes. The frame containing the "Overview", "Output", "Snippets" and "Result" also seems unaffected.
The other SQL Editor tabs remaining accessible and seem to be working.

I'm using WinXP SP3. MySQL Server is localhost.

Here is the stack trace:
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 Sql_editor.check_sql(Sql_editor* , Boolean )
   at MySQL.Grt.Db.Sql.Sql_editor.check_sql(Boolean sync)
   at MySQL.Grt.Db.Sql.SqlEditor.CheckSql(Boolean sync)
   at MySQL.Grt.Db.Sql.SqlEditor.RunBackgroundAction(Boolean sync)
   at MySQL.Grt.Db.Sql.SqlEditor.BackgroundActionTimer(Object obj, EventArgs args)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[7 Dec 2010 22:41] Alfredo Kojima
The 2 stack traces provided here are different. The ones from Yves are believed to have been fixed previously and he does say he can't repeat anymore, so I'll ignore these.

The one provided by Carlos Silva is something that we couldn't repeat, but have seen in other bug reports too.

I'll set this to Verified and use this as the hub for similar crashes that happen while editing SQL in scripts.
[8 Dec 2010 17:58] Alfredo Kojima
Carlos: please try repeating with 5.2.31

bugs #55451, #53520, #53404, #52555, #52328 and others are similar
[16 Dec 2010 23:01] Alfredo Kojima
bug #58783 is a duplicate
[8 Feb 2011 15:11] Alfredo Kojima
marked bug #59742 as duplicate
[27 Mar 2011 16:20] Valeriy Kravchuk
Bug #60534 was marked as a duplicate of this one.
[25 Apr 2011 22:45] Alfredo Kojima
bug #60953 is a duplicate
[3 Nov 2011 12:21] Alfredo Kojima
Can anyone confirm whether this still happens in version 5.2.35?
[1 Dec 2011 18:34] Philip Olson
Fixed as of 5.2.36:

+        Using &workbench; could result in an unhandled exception, with
+        the message "Attempted to read or write protected memory. This
+        is often an indication that other memory is corrupt."