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

[ns] SIGSEGV in TclClass::dispatch_cmd ()



Hi,

I have implemented a queue, I was able to create it and attach it in the
list of Connectors (representing a LINK). However when a command is
executed on that queue, it is giving me an SIGSEGV. Here is a snippet of
my tcl code:

$ns simplex-link $node($i) $chan($j) $bandwidth $propdelay dsRED/WDMEdge

set que($i,$j) [[$ns link $node($i) $chan($j)] queue]
$wdmsch addQ $que($i,$j) [$node($i) id] [$chan($j) id]
...

$que($i,$j) meanPktSize $packetSize <<==

this is the command where it is failing, also anyother command on the
queue object also fails. Here is the error message that GDB returned:

Program received signal SIGSEGV, Segmentation fault.
0x216e7c in TclClass::dispatch_cmd () at gen/ptypes.cc:120
120     EmbeddedTcl et_ns_ptypes(code);

++++++++++++++++++++++++++++++++
Here is the C++ queue definition
++++++++++++++++++++++++++++++++

class WDMQueue : public WDMSchedulerStub, public modEdgeQueue {
public:
    WDMQueue();
    virtual void enque(Packet* p);
    virtual Packet* getNextPacket();
    virtual void fwdPacket(Packet *p, Handler *h);
    int command(int argc, const char*const* argv);
}

+++++++++++
Tcl linkage
+++++++++++

static class WDMQueueClass : public TclClass {
public:
    WDMQueueClass() : TclClass("Queue/dsRED/WDMEdge") {};
    TclObject* create(int argc, const char*const* argv) {
        return (new WDMQueue());
    }
} class_wdm_edge_queue;

Any suggestions/comments?

Thanks in Anticipation.

Regards,
Sudhin.


****************** Sudhindra Suresh Bengeri ********************
Graduate Research Assistant   | Home:                          |
to Dr. George N. Rouskas      | 2110, Gorman St.,              |
EGRC 454H, Computer Sci. dept.| Raleigh, NC - 27606            |
NCSU, Raleigh, NC 27695       | Ph. (919) 852-1961             |
(919)515-3655(P) / 515-7925(F)
My web projection: http://www4.ncsu.edu/~ssbenger

* Always glad to share my ignorance - I've got plenty. *