[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] What does this error means?-Help
Hi, all,
I have developed a queue for TDMA scheduling based on token model.
I derive the UpSched and DnSched class from Queue and declare my own
enque/deque function. Make is ok, however when run there is error as follows:
(gdb) r mactest.tcl
Starting program: /root/software/ns2/ns-allinone-2.1b5/bin/ns mactest.tcl
Program received signal SIGSEGV, Segmentation fault.
0x81053d6 in Packet::access (this=0x0, off=936) at packet.h:222
222 return (&bits_[off]);
it seems the error is at line:
hdr_cmn* hdr = (hdr_cmn*)p->access(off_cmn_);
int pktSize = hdr->size();
I have use this both in enque() and deque() to acquire packetsize.
I can't figure out what the bug is.
I will appreciate any comment you give me.
Thanks.