[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] segmentation fault (fwd)





hi all,
  i am getting a segmentation fault after i made some changes in red.cc.i
am trying to add two logical queues.for this i have declared two average
queue lengths as TracedDouble..i think i am getting the problem when i bind these
variables but am unable to figure out the problem looking at the gdb
output.i am attaching the file containing the gdb output.i have made changes in
red.cc,red.h,ns-default and ns_tcl.is there anything more which i need to
change for adding these variables which is causing this problem.also
please let me know how can i put breakpoints in the program?i am new to
otcl with  c++ debugging.any help will be appreciated.
   thanks
   Renjish. 

Script started on Mon Aug 28 17:45:36 2000
0;root@cfcir9: /root/ns-allinone-2.1b6/ns-2.1b6[root@cfcir9 ns-2.1b6]# gdb ns
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run research.tcl
Starting program: /root/ns-allinone-2.1b6/ns-2.1b6/ns research.tcl

Program received signal SIGSEGV, Segmentation fault.
0x80f82a5 in TracedDouble::operator= () at gen/ptypes.cc:112
112	EmbeddedTcl et_ns_ptypes(code);
(gdb) bt
#0  0x80f82a5 in TracedDouble::operator= () at gen/ptypes.cc:112
#1  0x815bbd3 in InstVarTracedReal::set ()
#2  0x80f68a4 in InstVar::catch_write () at gen/ptypes.cc:112
#3  0x80f67ab in InstVar::catch_var () at gen/ptypes.cc:112
#4  0x8136421 in CallTraces () at gen/ptypes.cc:112
#5  0x8134769 in Tcl_ObjSetVar2 () at gen/ptypes.cc:112
#6  0x8115698 in TclExecuteByteCode () at gen/ptypes.cc:112
#7  0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#8  0x81301dc in TclObjInterpProc () at gen/ptypes.cc:112
#9  0x812fe10 in TclProcInterpProc () at gen/ptypes.cc:112
#10 0x80f8e5c in OTclDispatch (cd=0x83426b0, in=0x82d2c38, argc=4, argv=0xbfffa4d0) at otcl.c:421
#11 0x80fcf24 in TclInvokeStringCommand () at gen/ptypes.cc:112
#12 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#13 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#14 0x81301dc in TclObjInterpProc () at gen/ptypes.cc:112
#15 0x812fe10 in TclProcInterpProc () at gen/ptypes.cc:112
#16 0x80f8e5c in OTclDispatch (cd=0x83426b0, in=0x82d2c38, argc=3, argv=0xbfffadf4) at otcl.c:421
#17 0x80fcf24 in TclInvokeStringCommand () at gen/ptypes.cc:112
#18 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#19 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#20 0x80fd53f in Tcl_Eval () at gen/ptypes.cc:112
#21 0x80f699c in InstVar::init () at gen/ptypes.cc:112
#22 0x80f6bfd in TclObject::init () at gen/ptypes.cc:112
#23 0x80f6fa0 in TclObject::bind () at gen/ptypes.cc:112
#24 0x80f3b7e in PREDQueue::PREDQueue (this=0x8331aa0) at pred.cc:118
#25 0x815b67a in PREDClass::create (this=0x82cde8c) at pred.cc:80
#26 0x80f5fcf in TclClass::create_shadow () at gen/ptypes.cc:112
#27 0x80f8e5c in OTclDispatch (cd=0x83426b0, in=0x82d2c38, argc=2, argv=0xbfffb518) at otcl.c:421
#28 0x80fcf24 in TclInvokeStringCommand () at gen/ptypes.cc:112
#29 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#30 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#31 0x8114bd7 in TclExecuteByteCode () at gen/ptypes.cc:112
#32 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#33 0x81301dc in TclObjInterpProc () at gen/ptypes.cc:112
#34 0x812fe10 in TclProcInterpProc () at gen/ptypes.cc:112
#35 0x80f8e5c in OTclDispatch (cd=0x83426b0, in=0x82d2c38, argc=2, argv=0xbfffc218) at otcl.c:421
#36 0x80fcf24 in TclInvokeStringCommand () at gen/ptypes.cc:112
#37 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#38 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#39 0x80fd53f in Tcl_Eval () at gen/ptypes.cc:112
#40 0x80fe9cc in Tcl_VarEval () at gen/ptypes.cc:112
#41 0x80fa9d8 in OTclCCreateMethod (cd=0x832b3b8, in=0x82d2c38, argc=5, argv=0xbfffc890) at otcl.c:1539
#42 0x80f8e5c in OTclDispatch (cd=0x832b3b8, in=0x82d2c38, argc=3, argv=0xbfffc8d8) at otcl.c:421
#43 0x80fcf24 in TclInvokeStringCommand () at gen/ptypes.cc:112
#44 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#45 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#46 0x8114bd7 in TclExecuteByteCode () at gen/ptypes.cc:112
#47 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
---Type <return> to continue, or q <return> to quit---
#48 0x81301dc in TclObjInterpProc () at gen/ptypes.cc:112
#49 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#50 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#51 0x81068f2 in Tcl_SwitchObjCmd () at gen/ptypes.cc:112
#52 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#53 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#54 0x81301dc in TclObjInterpProc () at gen/ptypes.cc:112
#55 0x812fe10 in TclProcInterpProc () at gen/ptypes.cc:112
#56 0x80f8e5c in OTclDispatch (cd=0x8333fc0, in=0x82d2c38, argc=7, argv=0xbfffe1a4) at otcl.c:421
#57 0x80fcf24 in TclInvokeStringCommand () at gen/ptypes.cc:112
#58 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#59 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#60 0x8100536 in Tcl_EvalObjCmd () at gen/ptypes.cc:112
#61 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#62 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#63 0x81301dc in TclObjInterpProc () at gen/ptypes.cc:112
#64 0x812fe10 in TclProcInterpProc () at gen/ptypes.cc:112
#65 0x80f8e5c in OTclDispatch (cd=0x8333fc0, in=0x82d2c38, argc=7, argv=0xbfffef0c) at otcl.c:421
#66 0x80fcf24 in TclInvokeStringCommand () at gen/ptypes.cc:112
#67 0x81149d4 in TclExecuteByteCode () at gen/ptypes.cc:112
#68 0x80fd72c in Tcl_EvalObj () at gen/ptypes.cc:112
#69 0x8125d3c in Tcl_EvalFile () at gen/ptypes.cc:112
#70 0x8127ab3 in Tcl_Main () at gen/ptypes.cc:112
#71 0x804acb5 in main (argc=2, argv=0xbffff9e4) at tclAppInit.cc:59
(gdb)
(gdb) quit
The program is running.	 Exit anyway? (y or n) y
0;root@cfcir9: /root/ns-allinone-2.1b6/ns-2.1b6[root@cfcir9 ns-2.1b6]#
Script done on Mon Aug 28 17:46:08 2000