Your problem looks like the stacksize issue. If your stacksize in the nsd.tcl is less than 500000 try increasing it.