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

Re: running error of a new agent?



Assuming that you've corrected new-ed the packet, sounds to me like that
your target_ is NULL? Did you properly attach the agent to a node? 

On Tue, 21 Dec 1999, Ghassan Chaddoud wrote:

> Dear ns-isers,
> when I run my ns script using a new agent grpkey I find this error:
> ----------------------------------
> Program received signal SIGSEGV, Segmentation fault.
> 0x805e97d in Agent::send (this=0x83ec360, p=0x83f03e8, h=0x0) at
> agent.h:71
> 71              void send(Packet* p, Handler* h) { target_->recv(p, h);
> }
> ----------------------------------
> the error comes from "send"( the send of the class agent) in this code:
> int GrpKeyAgent::command(int argc, const char*const* argv) {
>   static  int i=0; int j;  
> if (argc == 2) {
>     if (strcmp (argv[1], "invite") == 0) {
>       //create a new packet and send it
>       
>       send(pkt, 0);
>   }
>    return (Agent::cammand(argc,argv));  
> }
> I don't understand why this error I use here the same "send" in ping.cc
> of the tutorial. 
> 
> I'll appreciate any help 
> 
> Regards
> 
> -- 
> Ghassan CHADDOUD
> LORIA/INRIA-Lorraine
> Campus Scientifique BP 239
> 54506 Vandoeuvre-les-Nancy CEDEX
>