Closed yoursunny closed 11 years ago
Steps to reproduce:
#include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/ndnSIM-module.h" using namespace ns3; int main(int argc, char *argv[]) { NodeContainer nodes; nodes.Create(1); ndn::StackHelper ndnHelper; ndnHelper.InstallAll(); ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr"); consumerHelper.SetAttribute("Randomize", StringValue("uniform")); ApplicationContainer apps = consumerHelper.Install(nodes.Get(0)); apps.Get(0)->SetAttribute("Randomize", StringValue("none")); Simulator::Stop(Seconds(5.0)); Simulator::Run(); Simulator::Destroy(); return 0; }
Expected: simulation completes without memory error Actual: program terminated with signal SIGSERV
Suggested fix: change else if to if on https://github.com/NDN-Routing/ndnSIM/blob/eae83eec953324a6b5784d8ec8ca4fc711cd8a6a/apps/ndn-consumer-cbr.cc#L114
else if
if
Steps to reproduce:
Expected: simulation completes without memory error Actual: program terminated with signal SIGSERV