Bug #50980 Index was out of range error when switching from Model tab to Home tabe
Submitted: 8 Feb 2010 8:13 Modified: 22 Mar 2010 11:47
Reporter: Louis van der Walt Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:V5.2.15 OS:Windows (Windows 7 Ultimate 32bit)
Assigned to: CPU Architecture:Any
Tags: Index out of range, workbench

[8 Feb 2010 8:13] Louis van der Walt
Description:
If I open my model in model view (tab) and double click on a table to select it and show its fields and then select the Home tab I get and index out of range error. Restarting Workbench makes no diff. Using the same sequence, the same error happens again. Under all lists in the Home Screen I have at least 1 entry (SQL Development, Data Modeling & Server Administration)

Here is the dump:

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.HookEventHandler(Object sender, HookEventArgs e)
   at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.LocalWindowsHook.OnHookInvoked(HookEventArgs e)
   at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.LocalWindowsHook.CoreHookProc(Int32 code, IntPtr wParam, IntPtr lParam)
   at WeifenLuo.WinFormsUI.Docking.NativeMethods.CallNextHookEx(IntPtr hhook, Int32 code, IntPtr wParam, IntPtr lParam)
   at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.LocalWindowsHook.CoreHookProc(Int32 code, IntPtr wParam, IntPtr lParam)
   at WeifenLuo.WinFormsUI.Docking.NativeMethods.CallNextHookEx(IntPtr hhook, Int32 code, IntPtr wParam, IntPtr lParam)
   at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.LocalWindowsHook.CoreHookProc(Int32 code, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.SetFocus(HandleRef hWnd)
   at System.Windows.Forms.ContainerControl.FocusActiveControlInternal()
   at System.Windows.Forms.ContainerControl.SetActiveControlInternal(Control value)
   at System.Windows.Forms.ContainerControl.SetActiveControl(Control ctl)
   at System.Windows.Forms.ContainerControl.set_ActiveControl(Control value)
   at System.Windows.Forms.Control.Select(Boolean directed, Boolean forward)
   at System.Windows.Forms.Control.SelectNextControl(Control ctl, Boolean forward, Boolean tabStopOnly, Boolean nested, Boolean wrap)
   at System.Windows.Forms.Control.SelectNextControlInternal(Control ctl, Boolean forward, Boolean tabStopOnly, Boolean nested, Boolean wrap)
   at System.Windows.Forms.Control.SelectNextIfFocused()
   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Control.set_Visible(Boolean value)
   at WeifenLuo.WinFormsUI.Docking.DockContentHandler.SetVisible()
   at WeifenLuo.WinFormsUI.Docking.DockPane.set_ActiveContent(IDockContent value)
   at WeifenLuo.WinFormsUI.Docking.DockPaneStripBase.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at WeifenLuo.WinFormsUI.Docking.DockPaneStripBase.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 model in model view (tab) and double click on a table to select it and show its fields.
Then select the Home tab to get and index out of range error.
[9 Feb 2010 7:35] Valeriy Kravchuk
Verified just as described on 64-bit XP. I've opened SQL Development and Server
Administration tabs for local 5.1 server, then I've opened one of the .mwb files, double clicked on one of the tables, clicked on Column tab and then on Home tab. WB crashed/disappeared silently.
[9 Feb 2010 17:23] Valeriy Kravchuk
Bug #51030 was marked as a duplicate of this one.
[22 Mar 2010 10:12] Johannes Taxacher
fixed in repository due to partial rework of UI in windows
[22 Mar 2010 11:47] Tony Bedford
An entry has been added to the 5.2.17 changelog:

An Out of Range exception occurred when switching from the Table Editor to the Home screen.
[16 Aug 2010 5:11] Roel Van de Paar
Bug #52749 was marked as a duplicate of this one
[16 Aug 2010 5:15] Roel Van de Paar
Same trace as in bug #50768