[ns] Segmentation fault in sprintf
kpowerinfinity at gmail.com
Wed Mar 22 12:27:56 PST 2006
I am trying to print out some intermediary values using tcl.evalf.
However, I get a segmentation fault as soon as I try to print a float
value to a string in the C++ TcpAgent Code:
sprintf(str, "puts \"desired case: cwnd=%f, fallback=%f ssthresh=%f
x=%f y=%f \"", cwnd_, fallback_cwnd_, ssthresh_, x, y); //Segmentation
fault encountered in this statement!
I am using ns-2.29 on a linux system: uname -a ==
Linux server 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686
i686 i386 GNU/Linux
Please let me know what is the cause of the Segmetation fault and how
we can possibly remove it.
Thanks and anticipation,
More information about the Ns-users