Solution - Responder - Error Removing a Tag Created from a Switch Order

Version 1

    Behavior

    The following error is received when trying to remove a tag:

     

    An unexpected program error has occurred.

    Refer to the error log for detailed information about the error.

    System.IndexOutOfRangeException: There is no row at position 0.

       at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex)

       at System.Data.RBTree`1.get_Item(Int32 index)

       at System.Data.DataRowCollection.get_Item(Int32 index)

       at Miner.Responder.Explorer.SwitchingHelper.AddRemoveTagAndGroundStep(DataSet dataSet, DataRow tagRow)

       at Miner.Responder.Explorer.Commands.Implementations.TagDelete.RemoveTagOrGroundFromSwitchingOrder(DataRow tagRow)

       at Miner.Responder.Explorer.Commands.Implementations.TagDelete.Execute(DataRow[] rows)

       at Miner.Responder.Explorer.Commands.CommandButtonTagDelete.OnClick(EventArgs args)

       at Miner.Windows.Commands.Command.ToolClickEvent(Object sender, ToolClickEventArgs e)

       at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick(ToolClickEventArgs e)

       at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)

       at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)

       at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick()

       at Infragistics.Win.UltraWinToolbars.ToolMenuItem.OnClick()

       at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.DoClickProcessing(MouseEventArgs e)

       at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.OnMouseUp(MouseEventArgs e)

       at Infragistics.Win.UIElement.OnMouseUp(MouseEventArgs e)

       at Infragistics.Win.TextUIElementBase.OnMouseUp(MouseEventArgs e)

       at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)

       at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)

       at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)

       at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e)

       at Infragistics.Win.UltraWinToolbars.PopupControlBase.OnMouseUp(MouseEventArgs 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)

     

     

     

    Problem

    The problem can occur if the tag you were trying to remove was placed within a switch order that is no longer present in the system. If the tag was placed in a switch order and then not removed from within the switch order before the incident was managed out, this will create a situation for the error to occur when it's removed again.

     

    Solution

    A code change has been made to address this in future releases. A workaround for current releases is to remove the tag via SQL.