Segmentation Fault in NS2

Hi Friends …
My friend who are using NS2 specially Ad-Hoc Simulation they sometime got this problem
“Segmentation Fault ”

arun@Merom:~/myNS2/Assignment/Wireless$ ns wireless-tcp1.tcl 
num_nodes is set 8
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Starting Simulation…Sir !!!!
channel.cc:sendUp – Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS …DONE!
Segmentation fault
I have a solution for that please go through this post and you will be happy ..
 
 
actually this segmentation fault problem happens due to “DSR” Ad-Hoc routing table  when we are using any type  of queue with DSR routing Algo . so CMU made a “CMUPriQueue” to deal with that so please follow that code …..
 
 
if { $val(rp) == “DSR” } {
set val(ifq)            CMUPriQueue
} else {
set val(ifq)            Queue/DropTail/PriQueue
} 
 
 
 
so there will be no segmentation fault ….
Enjoy please like it … if your problem is solved .
please paste this before creating GOD