Bug #50768 Unexpected error when switching from model to home panel
Submitted: 31 Jan 2010 17:50 Modified: 9 Feb 2010 10:14
Reporter: David Btm Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.15 r5053 OS:Windows (XP SP3 (32-bit))
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Edit, error, home, model, panel, switch

[31 Jan 2010 17:50] David Btm
Description:
When you are in the "MySQL model" main panel and the edit panel is displayed, if you switch to the "Home" main panel, an unexpected error occurs.

How to repeat:
Launch MySqlWorkbench
Select "File" > "New Model" in the menu
Click the "MySQL Model" bevel
Double-click on "Add Table"
(the edit panel is then displayed at the bottom)
Click the "Home" bevel
-> an unexpected error should occur
[1 Feb 2010 12:16] Johannes Taxacher
can't repeat on my win7 x64 box
[1 Feb 2010 12:39] Valeriy Kravchuk
Verified just as described on 32-bit XP Home SP3. The following info about the bug was provided by WB:

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)
[2 Feb 2010 10:52] Mike Lischke
Fixed in 5.2
[8 Feb 2010 17:35] Johannes Taxacher
fixed in repository
[9 Feb 2010 10:14] Tony Bedford
An entry has been added to the 5.2.16 changelog:

In the MySQL Model tab, if the Table Editor was launched and then the Home screen tab clicked, MySQL Workbench displayed the MySQL Workbench Unexpected Error dialog.
[10 Feb 2010 9:11] Johannes Taxacher
Bug #51039 has been marked as duplicate of this one
[10 Feb 2010 9:17] Johannes Taxacher
Bug #51044 has been marked as duplicate of this one
[15 Feb 2010 13:05] Johannes Taxacher
Bug #51170 has been marked as duplicate of this one
[16 Aug 2010 5:15] Roel Van de Paar
Same trace as in bug #50980