Bug #51200 Exception when closing Query DB window
Submitted: 15 Feb 2010 20:26 Modified: 18 Feb 2010 2:16
Reporter: Jason Burns Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.15 OS:Windows (XP 64)
Assigned to: CPU Architecture:Any

[15 Feb 2010 20:26] Jason Burns
Description:
From the exception window pop-up

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.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at System.Collections.ObjectModel.ReadOnlyCollection`1.get_Item(Int32 index)
   at MySQL.GUI.Workbench.MainForm.mainDockPanel_ActiveDocumentChanged(Object sender, EventArgs e)
   at WeifenLuo.WinFormsUI.Docking.DockPanel.OnActiveDocumentChanged(EventArgs e)
   at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.RefreshActiveWindow()
   at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.ResumeFocusTracking()
   at WeifenLuo.WinFormsUI.Docking.DockPanel.ResumeLayout(Boolean performLayout, Boolean allWindows)
   at WeifenLuo.WinFormsUI.Docking.DockPane.CloseContent(IDockContent content)
   at WeifenLuo.WinFormsUI.Docking.DockPane.CloseActiveContent()
   at WeifenLuo.WinFormsUI.Docking.VS2005DockPaneStrip.Close_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   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:
I was in the EER window and clicked Database -> Query Database.  I chose a stored connection and connected to the DB.  Having realized I clicked on the wrong option, I then closed the resulting Query window.  This exception happened immediately after.
[16 Feb 2010 3:34] MySQL Verification Team
Thank you for the bug report. I couldn't repeat or I misunderstood: "Having realized I clicked on the wrong option, I then closed the resulting Query window.".
Are you able to show the above with attached pictures?. Thanks in advance.
[16 Feb 2010 19:12] Jason Burns
Unfortunately I took no pictures.  I filed the bug based on the pop-up exception window asking me to do so.  I cannot reproduce it now either, so I'm assuming it may be some kind of race condition in the code.
[18 Feb 2010 2:16] MySQL Verification Team
Thank you for the feedback. If you are able to repeat and provide the step by step for, please re-open this bug report with that information. Thanks in advance.