Bug #59532 Read or write protected memory
Submitted: 16 Jan 2011 10:05 Modified: 29 Apr 2011 13:02
Reporter: Jan Kreta Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.31 Rev7115 OS:Windows (Vista)
Assigned to: CPU Architecture:Any
Tags: Corrupted memory

[16 Jan 2011 10:05] Jan Kreta
Description:
After creating some tables, the GUI stopped updating. the nodes did't show the new tables.
Everything went fine for the first tables.

i was creating tables, referencing them (foreign keys).
didn't do a "refresh all" on the treeview, looking at the stack trace, i think that's where it went wrong.

because i put the SQL service on "Manual", i had to start it myself. Had some problems before i started with this (i expected Workbench to start the service for me; i put it on manual so the service will not consume my memory when i'm not developing on MySQL). Perhaps this is also related?

How to repeat:
am not sure.

Suggested fix:
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_field(NodeId node, Int32 column, String& value)
   at MySQL.Grt.SimpleGrtTreeModel.ValueNeeded(Object sender, NodeControlValueEventArgs e)
   at Aga.Controls.Tree.NodeControls.BindableControl.OnValueNeeded(NodeControlValueEventArgs args)
   at Aga.Controls.Tree.NodeControls.BindableControl.GetValue(TreeNodeAdv node)
   at Aga.Controls.Tree.NodeControls.BaseTextControl.GetLabel(TreeNodeAdv node)
   at Aga.Controls.Tree.NodeControls.BaseTextControl.MeasureSize(TreeNodeAdv node, DrawContext context)
   at Aga.Controls.Tree.NodeControls.NodeControl.GetActualSize(TreeNodeAdv node, DrawContext context)
   at Aga.Controls.Tree.TreeViewAdv.<GetNodeControls>d__f.MoveNext()
   at Aga.Controls.Tree.TreeViewAdv.<GetNodeControls>d__8.MoveNext()
   at Aga.Controls.Tree.TreeViewAdv.DrawNode(TreeNodeAdv node, DrawContext context)
   at Aga.Controls.Tree.TreeViewAdv.DrawRow(PaintEventArgs e, DrawContext& context, Int32 row, Rectangle rowRect)
   at Aga.Controls.Tree.TreeViewAdv.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(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)
[25 Jan 2011 17:44] Valeriy Kravchuk
What exact version of server, x.y.z, are you working with?
[26 Jan 2011 9:07] Jan Kreta
I'm running MySQL server 5.5.8
[27 Jan 2011 19:30] Sveta Smirnova
Thank you for the report.

How many tables have you created before started seeing issue?
[27 Jan 2011 19:50] Jan Kreta
I believe 3. Perhaps 4.
Back then, the database model consisted of 6 tables.
I created 1, everything fine.
I created the second, which didn't appear in the GUI, and then i created the third (also didn't appear in GUI), then i refreshed the tree (Refresh all).
Then i created the other 3 and with the last one it happened.
But i believe that i deleted the third one after refreshing (or i altered it).
Also, i'm not 100% sure of this reconstruction, perhaps i did more altering. I remember i was especially working with the foreign keys (read: i was forgetting them).

It happened only once, and i couldn't reproduce it.
[29 Apr 2011 13:02] Armando Lopez Valencia
Thanks for your report Jan.
Due that we can't reproduce this defect I'll close it, but if you find the way to reproduce it again, feel free to re-open it.
Thanks.