Bug #61279 Error Message
Submitted: 24 May 2011 19:35 Modified: 1 Dec 2011 18:37
Reporter: Tanimul Amin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.33 rev: 7508 OS:Microsoft Windows (7)
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D2 (Serious)

[24 May 2011 19:35] Tanimul Amin
Description:
Exception = System.ArgumentOutOfRangeException
Message = Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
FullText = System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at System.Windows.Forms.DataGridViewColumnCollection.get_Item(Int32 index)
   at System.Windows.Forms.DataGridView.PositionEditingControl(Boolean setLocation, Boolean setSize, Boolean setFocus)
   at System.Windows.Forms.DataGridView.OnLayout(LayoutEventArgs e)
   at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
   at System.Windows.Forms.Control.PerformLayout()
   at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
   at System.Windows.Forms.Control.set_Dock(DockStyle value)
   at MySQL.GUI.Workbench.DbSqlEditor.onSizeChanged(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(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)

How to repeat:
In a table, double click on any field to edit(e.g. could be copying the content). 
Keep it in the <b>same state</b> and click the SQL statement EXECUTE button.
After you see the error message, try minimizing and maximizing the workbench window. The message dialog keeps showing up which is very annoying!

Actual Scenario:

Sometimes I need to copy a field content to test my form functionalities. Then after testing, I instinctively click the execute button to refresh the table in order to see the changes I made to the table From my form. That is when the error occurs and the dialog box persists.  

Suggested fix:
In such a case:

if the table field is actually changed via double clicking on it or manually and the execute button is clicked,then it should ask if the user wants to save the change or not. 

if it remains unchanged, it should just refresh the table on clicking the execute button.

Please enlighten me if I am wrong somewhere. The error message dialog is highly inconvenient.
[25 May 2011 22:49] Miguel Solorzano
Thank you for the bug report.
[10 Jun 2011 17:20] Alfredo Kojima
bug #61279 is a duplicate
[7 Jul 2011 3:12] Miguel Solorzano
See http://bugs.mysql.com/bug.php?id=61779.
[1 Dec 2011 18:37] Philip Olson
Fixed as of 5.2.36:
+        Pressing <guibutton>Execute</guibutton> after double clicking
+        and editing a field in <literal>select all</literal> mode,
+        resulted in an unhandled exception.