Hello,
I've got a very simple diagram and got the following exception:
System.ArgumentOutOfRangeException was unhandled
Message="Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"
Source="mscorlib"
ParamName="index"
StackTrace:
at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
at MindFusion.Diagramming.AnchorPointCollection.get_Item(Int32 index)
at MindFusion.Diagramming.x13ba473cd1de406f.GetAnchorPos(Int32 anchorIdx)
at MindFusion.Diagramming.DiagramLink.xb05f5d996d82647f(Anchoring x7ba664bd6885b404, Boolean x49743b78538984b7)
at MindFusion.Diagramming.DiagramLink.xb05f5d996d82647f(Anchoring x7ba664bd6885b404)
at MindFusion.Diagramming.DiagramLink.set_Style(LinkStyle value)
at MindFusion.Diagramming.Layout.TreeLayout.UpdateLink(DiagramLink a, Boolean ignoredDirection)
at MindFusion.Diagramming.Layout.TreeLayout.Arrange(Diagram diagram, DiagramItemCollection items)
at AnimationSequencer.AnimationSequencer.ArrangeSubItems(TreeLayout layout, ContainerNode container) in C:\Perforce\f1\programming\tools\game\AnimationSequencer\AnimationSequencer.cs:line 1815
at AnimationSequencer.AnimationSequencer.LayoutDiagram() in C:\Perforce\f1\programming\tools\game\AnimationSequencer\AnimationSequencer.cs:line 1851
at AnimationSequencer.AnimationSequencer.toolStripButton1_Click(Object sender, EventArgs e) in C:\Perforce\f1\programming\tools\game\AnimationSequencer\AnimationSequencer.cs:line 2710
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AnimationSequencer.Program.Main() in C:\Perforce\f1\programming\tools\game\AnimationSequencer\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Ive got 4 table nodes each with 1 input anchor and between (0-2) output anchors.
eg
containernode
{
tablenode1----> tablenode2 ------->tablenode3
|
---->tablenode4
}
table node 1 is the rootnode.
I'll send my diagram to you, but the long and short of it is that the link between tablenode1 and tablenode2, is causing this exception.
I put a try catch arround the arrange function that was generating the exception. The resultant diagram after not crashing crashing shows that the link between tablenode1 and tablenode2 had lost its destination anchoring and was now anchored to the container node.