Bug #52384 Performing query produced mysql workbench crash
Submitted: 26 Mar 2010 7:56 Modified: 1 May 2010 6:52
Reporter: Mike Emmott Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.16beta OS:Windows (xp sp3)
Assigned to: CPU Architecture:Any

[26 Mar 2010 7:56] Mike Emmott
Description:
For detail of workbench version, it is whatever was available for download as the workbench beta, yesterday, 25Mar10

server version 5.1.45 Community

Trying to perform a join between exported tables from Sugar CRM.

I don't promise that the SQL makes sense, or parses:

select count(*) from contacts a left outer join email_address_bean_rel b on (a.id = b.bean_id) left outer join email_addresses c on b.email_address_id = c.id  where bean_module = 'Contact'

When I first tried to execute it, nothing happened.

Then I clicked the mouse into the SQL editor (thinking to give that focus), then clicked on the 'lightening-strike-with-a-text-cursor' icon, then pretty promptly a huge cross was drawn over the output window and the MySQL workbench unexpected error window was shown.

Before doing this, I had been working on an EER diagram.  The machine had been brought out of standby after being left stood by overnight.  Both the MySQL server and the workbench had gone into standby and come out.

You ask us to 'copy bug info to clipboard'; here are the contents of that:

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.GridModel.get_field_repr(NodeId node, Int32 column, String& value)
   at MySQL.Utilities.GridView.OnCellValueNeeded(Object sender, DataGridViewCellValueEventArgs e)
   at System.Windows.Forms.DataGridView.OnCellValueNeeded(DataGridViewCellValueEventArgs e)
   at System.Windows.Forms.DataGridView.OnCellValueNeeded(Int32 columnIndex, Int32 rowIndex)
   at System.Windows.Forms.DataGridViewCell.GetValue(Int32 rowIndex)
   at System.Windows.Forms.DataGridViewCell.PaintWork(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, Int32 rowIndex, DataGridViewElementStates cellState, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
   at System.Windows.Forms.DataGridViewRow.PaintCells(Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, Int32 rowIndex, DataGridViewElementStates rowState, Boolean isFirstDisplayedRow, Boolean isLastVisibleRow, DataGridViewPaintParts paintParts)
   at System.Windows.Forms.DataGridViewRow.Paint(Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, Int32 rowIndex, DataGridViewElementStates rowState, Boolean isFirstDisplayedRow, Boolean isLastVisibleRow)
   at System.Windows.Forms.DataGridView.PaintRows(Graphics g, Rectangle boundingRect, Rectangle clipRect, Boolean singleHorizontalBorderAdded)
   at System.Windows.Forms.DataGridView.PaintGrid(Graphics g, Rectangle gridBounds, Rectangle clipRect, Boolean singleVerticalBorderAdded, Boolean singleHorizontalBorderAdded)
   at System.Windows.Forms.DataGridView.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.DataGridView.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:
The app bug catcher came up and asked me to report it.  I hope that this doesn't happen to me again this session.
[26 Mar 2010 11:59] Susanne Ebrecht
Many thanks for writing a bug report.

I am not able to follow you ... What do you thing is the bug here?
[29 Mar 2010 16:40] Mike Emmott
The 'what went wrong':  A message box came up, telling me that the workbench had caught an internal error, and with a button to press to copy details into Windows' clipboard.  The message box invited me to file a bug report.

So I clicked the 'copy the details' button and filed this bug report.  The trigger for this happening seemed to be asking the workbench to execute the query as given in my initial report.  Now, I'm not an experienced SQL author and I doubt that my SQL is good.

I'm afraid I didn't notice any more detail from the message box than this.  Sorry if there is a key phrase you would like to see which hasn't copied over with the 'copy the details' button's output.
[30 Mar 2010 7:23] Mike Emmott
I have two guesses as to what the bug might be:

1)  it fell over trying to parse bad sql
2)  taking the tool into and out of Windows 'Standby' leaves it undermined in some way
3)  taking it and the mysql db into and out of Windows 'Standby' somehow makes its connection go stale, but it doesn't notice and doesn't error trap it.

Three guesses for the price of two.  There's an offer you can't refuse .. :)
[1 Apr 2010 6:52] Susanne Ebrecht
Many thanks for writing a bug report.

Unfortunately, we have too less informations here for
making a deeper analysis.

We either need to know exactly how we can reproduce this
or we need the backtrace.

Please read: http://bugs.mysql.com/how-to-report.php
[1 May 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".