void Posted September 9, 2010 Posted September 9, 2010 class Node { string name; Node child[]; Node(string aName){name=aName;} }; void saveNode(Node node) { log.message("save node [%s] children count: [%i]\n",node.name,node.child.size()); foreach(Node n; node.child) saveNode(n); } int init() { Node root = new Node("zero"); Node one = new Node("one"); Node two = new Node("two"); root.child.append(1,one); one.child.append(2,two); root.child.append(3,new Node("three")); saveNode(root); return 1; } This code crashes application without any error message. Log: 13:01:15 Loading "worlds/vars.world" 186ms 13:01:15 save node [zero] children count: [2] 13:01:15 save node [one] children count: [1] 13:01:15 save node [two] children count: [0] The same behavior with vector.
frustum Posted September 9, 2010 Posted September 9, 2010 Thank you. Recursion bug is fixed. As temporary solution you can use vector array with for/forloop cycle instead of foreach. save node [zero] children count: [2] save node [one] children count: [1] save node [two] children count: [0] save node [three] children count: [0]
void Posted October 13, 2010 Author Posted October 13, 2010 I still get the same error in build of Unigine-20100907-src.. (
binstream Posted October 13, 2010 Posted October 13, 2010 I still get the same error in build of Unigine-20100907-src.. ( The bugfix will be incorporated into the next SDK update.
Recommended Posts