Bug #68583 MySQL Workbench Admin Crashes every time on startup
Submitted: 6 Mar 2013 2:39 Modified: 7 Aug 2013 18:48
Reporter: Yoseph Phillips Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S1 (Critical)
Version:MySQL Workbench CE for Windows version 5 OS:Microsoft Windows (Win 7 Prof SP 1)
Assigned to: CPU Architecture:Any

[6 Mar 2013 2:39] Yoseph Phillips
Description:
MySQL Workbench Admin Crashes every time on startup with error:

System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
   at System.Drawing.Graphics.MeasureString(String text, Font font, SizeF layoutArea, StringFormat stringFormat)
   at System.Drawing.Graphics.MeasureString(String text, Font font)
   at Aga.Controls.Tree.NodeControls.BaseTextControl.GetLabelSize(TreeNodeAdv node, DrawContext context, String label)
   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__7.MoveNext()
   at Aga.Controls.Tree.TreeViewAdv.<GetNodeControls>d__0.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)
   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)

How to repeat:
Open Admin
[16 Jul 2013 19:40] Jim Hetland
In Workbench 5.2.47 CE, on Windows 8, with MySQL 5.6.12:
I have seen such crashes, and believe they are caused by large INSERT statements retrieved by Admin's SHOW FULL PROCESSLIST.
I have only seen this crash during a recent reload of large (300 million+ rows) tables with multi-line INSERT statement; the input lines average about 1MB in length. 
If processlist happens to hit the reload thread sleeping, it's ok, but the next refresh likely crashes it.
I would like to see an option for Admin to use SHOW PROCESSLIST without FULL, as this is usually an unnecessary amount of network traffic.

Note: I tried to submit this bug report from the dialog that appeared in Workbench, but repeatedly failed to connect. As I am now logged in via web browser, I am certain I was using the correct (oracle) credentials.
[17 Jul 2013 6:53] Jim Hetland
I located a log for this error, which occurred repeatedly:

14:36:03 [ERR][      Workbench]: A generic error occurred in GDI+.
Exception = System.Runtime.InteropServices.ExternalException
Message = A generic error occurred in GDI+.
FullText = System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
   at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
   at Aga.Controls.Tree.NodeControls.BaseTextControl.Draw(TreeNodeAdv node, DrawContext context)
   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)
   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)
[6 Aug 2013 22:54] Alfredo Kojima
Thanks for the information. If this is indeed a problem with long queries being fetched from SHOW PROCESSLIST, it was already fixed a while ago, by truncating the displayed value to 255 bytes, so it's not supposed to be happening anymore with version 5.2.47. To check this theory, please open the wb_admin_connections.py file in a text editor and change around line 220 where it says:
                                r.set_string(c, field[:255])
to
                                r.set_string(c, "???")
and see if the problem still occurs.

Nevertheless, the suggestion for an option for toggling FULL sounds good.
[6 Aug 2013 23:25] Alfredo Kojima
Also, would it be possible to attach the output of SHOW FULL PROCESSLIST when crashes occur?
[7 Aug 2013 17:47] Jim Hetland
Not sure if I can set up a process big enough and long enough to raise this issue, but it may be moot: in my wb_admin_connections.py dated 02/14/2013 09:53 PM, line 217 reads

  r.set_string(c, field)

so evidently the field is not being truncated as you describe. Help/About states this is Workbench 5.2.47 CE / revision 10398. I will download again and see if this changes; perhaps the fix is later than you thought.
[7 Aug 2013 17:59] Jim Hetland
I downloaded again; the .msi file compares identical to the one I installed in early June, so I did not re-install.
[7 Aug 2013 18:44] Alfredo Kojima
Jim, you are right! I was somehow looking at a newer revision of the code. 

This bug is already fixed in the 6.0 series.
[7 Aug 2013 18:48] Alfredo Kojima
This is a duplicate of bug #68146