Re: [ns] segmentation problem

2012-08-08 Thread Saravanan Kandasamy

Dear Sunil Kumar,

Segmentation Fault is a very common problem faced by NS2 users. It has
to do with memory such as trying to access an address that cannot
physically be addressed, thus an exception has been called. It can
happen either in C++ side or at TCL side. The below looks like
happening from C++ side to me.

Thought the problem is very common, unfortunately the cause of the
Segmentation Fault are very wide. It takes more than providing couple
of preceding error lines to solve it.

The right way to handle a Segmentation Fault is by debugging the code.
To start with, if your simulation scenario involves 50 nodes, see if
you could replicate the problem in the smallest possible number of
nodes to simplify your debugging process. For C++ debugging you can
use GDB or even putting simple printf lines around  node 0 received
`UPD` from non-neighbor 5 lines to see if the change of variables,
memory allocation and function calls are done per your need.

It will take some time to understand how GDB codes work for first time
user and a certain amount of troubleshooting effort., once you get
used to it, it will be easy.  After finding where the abnormality
occur, work your way up the code to know what caused the abnormality
and rectify the problem.

Its very rare another person could able to help you to solve
Segmentation Fault without looking at all the codes.

Good Luck.

rgds
Saravanan Kandasamy

On Wed, Aug 8, 2012 at 5:08 AM, sunil kumar scientist@gmail.com wrote:

 hello every one
 I am working with ns-2.35 in windows environment. For ODMRP protocol if
 number of nodes increased above 10 then simulation running successfully for
 99% of simulation time and aborted with the message segmentation
 fault(core dumped)... what happend? can any one tell the solution for
 this...? thanks in advance



[ns] segmentation problem

2012-08-07 Thread sunil kumar

hello every one
I am working with ns-2.35 in windows environment. For ODMRP protocol if
number of nodes increased above 10 then simulation running successfully for
99% of simulation time and aborted with the message segmentation
fault(core dumped)... what happend? can any one tell the solution for
this...? thanks in advance


[ns] segmentation problem

2011-03-04 Thread narendra k

hi, all
i am getting following segmentation problem when i do make in ns-2.33 can
any one help me out.??
g++ -Wl,-export-dynamic  -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl  gen/ptypes.cc
/bin/sh: line 1:  4546 Segmentation fault  ./common/ptypes2tcl 
gen/ptypes.cc
make: *** [gen/ptypes.cc] Error 139
[root@localhost ns-2.33]#