<div dir="ltr">Hi all,<div><br></div><div>I hope you are well.I'm new to ns-3 and ndnSIM and still familiarizing myself with the platform. In my ndnSIM I tried 
creating an on-off application by changing the frequencies in the 
consumerHelper. When I try building I get a segmentation fault. Can 
anyone please explain to me the fault I'm getting. I can post my code as well if anyone wants to find where exactly I'm going wrong. <br></div><div><br></div><div>#include "ns3/core-module.h"<br>#include "ns3/network-module.h"<br>#include "ns3/point-to-point-module.h"<br>#include "ns3/ndnSIM-module.h"<br>#include "assert.h"<br>namespace ns3 {<br><br>int<br>main(int argc, char* argv[])<br>{<br>  Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("20Mbps"));<br>  Config::SetDefault("ns3::PointToPointChannel::Delay", StringValue("5ms"));<br>  Config::SetDefault("ns3::QueueBase::MaxSize", StringValue("50p"));<br><br>  CommandLine cmd;<br>  cmd.Parse(argc, argv);<br>  <br>  NodeContainer nodes;<br>  nodes.Create(5);<br>  for (int i=0;i<5;i++)<br>  {<br>  PointToPointHelper p2p;<br>  p2p.Install(nodes.Get(i),nodes.Get(i+1));<br>  }<br>  ndn::StackHelper ndnHelper;<br>  ndnHelper.setPolicy("nfd::cs::lru");<br>  ndnHelper.SetDefaultRoutes(true);<br>  ndnHelper.setCsSize(50);<br>  ndnHelper.InstallAll(); <br>  <br>  ndn::StrategyChoiceHelper::InstallAll("/prefix", "/localhost/nfd/startegy/best-route");<br>  <br>  //ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;<br>  //ndnGlobalRoutingHelper.InstallAll();<br>  <br>  // Consumer 1<br>  ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");<br>  <br>  consumerHelper.SetPrefix("/prefix");<br>  consumerHelper.SetAttribute("Frequency", StringValue("100")); <br>  auto Consumer1 = consumerHelper.Install(nodes.Get(0));                        <br>  Consumer1.Start(Seconds(2));<br>  Consumer1.Stop(Seconds(5));<br>  <br>  //Consumer 2<br>  consumerHelper.SetPrefix("/prefix");<br>  consumerHelper.SetAttribute("Frequency", StringValue("150")); <br>  auto Consumer2 = consumerHelper.Install(nodes.Get(1));                       <br>  Consumer2.Start(Seconds(0));<br>  Consumer2.Stop(Seconds(5));<br>  <br>  //Consumer 3<br>  consumerHelper.SetPrefix("/prefix");<br>  consumerHelper.SetAttribute("Frequency", StringValue("150")); <br>  auto Consumer3 = consumerHelper.Install(nodes.Get(2));                       <br>  Consumer3.Start(Seconds(3));<br>  Consumer3.Stop(Seconds(5));<br>  <br>  //Producer<br>  ndn::AppHelper producerHelper("ns3::ndn::Producer");<br>  producerHelper.SetPrefix("/prefix");<br>  producerHelper.SetAttribute("PayloadSize", StringValue("1024"));<br>  producerHelper.Install(nodes.Get(5));<br>  <br>//  ndn::GlobalRoutingHelper::CalculateRoutes();<br>  <br>  Simulator::Stop(Seconds(10.0));<br><br>  Simulator::Run();<br>  Simulator::Destroy();<br><br>  return 0;<br>}<br><br>} // namespace ns3<br><br>int<br>main(int argc, char* argv[])<br>{<br>  return ns3::main(argc, argv);<br>}<br>     

</div><div><br></div><div>Program received signal SIGSEGV, Segmentation fault.</div>0x00007ffff7f555ba in ns3::Ptr<ns3::NetDevice>::Ptr (this=0xf800005555556b8f, o=...) at ./ns3/ptr.h:741<br>741        : m_ptr (PeekPointer (o))<br><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p><b>Sai Gautam Mandapati</b></p>

<p>Deakin University</p>

<p>Doctor of Philosophy Student</p>

<p>Higher Degree by Research</p>

<p>Faculty of Science, Engineering and Built-in Environment</p>

<p>E-mail: <a href="mailto:saigautam96@gmail.com" target="_blank">saigautam96@gmail.com</a></p>

<p><a href="http://www.linkedin.com/in/sai-gautam-mandapati" target="_blank">http://www.linkedin.com/in/sai-gautam-mandapati</a></p></div></div></div>