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

Re: [ns] What does this error means?-Help



Yeah, I found the bug is in that packet is not generated correctly, I use 2D
array flow but not set correct id_ in corresponding agent. So the packet* p is
NULL.  But now I came across timer scheduling problem. 
The deque function will chose a suitable flow's packetqueue to deque and
sched(pktTime) for next packet. Considering TDMA characteristic, the timer also
need to handle Uplink/Downlink transmission. Can one timeout function can do
that task? 

I didn't modify packet.h. But Antonello's hints is valuable for me.
Thanks .
On Wed, 14Jun 2000, you wrote: > It looks that you didn't successfully allocate memory
for the packet. > check if you used allocpkt() to do that. > 
> On Tue, 13 Jun 2000, Anaking wrote:
> 
> > Hi, Haifeng,
> > 
> > Thanks for your help.
> > It still don't work, even after modification according to your mail. (But I
> > thought they are equivalent, and queue.h include packet.h) 
> > I print pointer this, it display  
> > 
> > (gdb) p this
> > $2 = (Packet *) 0x0
> > 
> > Which indicates that p is NULL, why would this occur?
> > In fact, the tcl scripts is ok for WFQ simulation. Packets are generated by UDP
> > agents. Why will p be NULL?
> > 
> > Best regards,
> > 
> > Pang
> > 
> > On Mon, 12 Jun 2000, you wrote:
> > > You might have got hdr NULL.  You may try:
> > > 
> > > hdr_cmn * hdr = hdr_cmn::access(p);
> > > 
> > > Don't forget to include packet.h (and maybe flag.h or ip.h, you may check
> > > the ns manual).
> > > 
> > > On Tue, 13 Jun 2000, Anaking wrote:
> > > 
> > > > 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.
> > > >
> >