Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Error in Flowchart.NET 5.01   Node layout pro (Read 2118 times)
dfzzqq
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Jan 28th, 2008
Error in Flowchart.NET 5.01   Node layout pro
Jan 29th, 2008 at 5:09am
Print Post  
    I created a number of nodes, let the nodes to a circle surrounded,Then I layout of these nodes,when the number of Nodes
Equivalent to more than 2700,system will thrown out Exception:" here may be infinite loop
or infinite recursion"
    this is the code:
    Collection<ShapeNode> nodes = new Collection<ShapeNode>();
           for (int i = 0; i <2700; i++)
           {
               ShapeNode node = diagram1.Factory.CreateShapeNode(20, 20, 5, 5);
               node.Text = i.ToString();
               nodes.Add(node);
           }
           for (int i = 0; i < nodes.Count; i++)
           {
               if (i == nodes.Count - 1)
               {
                   diagram1.Factory.CreateDiagramLink(nodes[i], nodes[0]).Text = "1";
               }
               else
               {
                   diagram1.Factory.CreateDiagramLink(nodes[i], nodes[i + 1]).Text = "1";
               }
           }
   springLayout1.Arrange(diagram1);
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Error in Flowchart.NET 5.01   Node layout pro
Reply #1 - Jan 29th, 2008 at 9:13am
Print Post  
The control is using a recursive function to detect the individual unconnected graphs in the diagram, and it seems the .NET call stack is not large enough to handle the recursive calls in your case. In the next release we will change our code to avoid using recursion. As a work-around, remove a few links from the diagram to create several unconnected graph components - this should avoid the problem for now.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint