Bug 1635

Summary: a small bug without Simulator::Destroy();
Product: ns-3 Reporter: Junling Bu <linlinjavaer>
Component: wifiAssignee: Nicola Baldo <nicola>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs, ruben
Priority: P5    
Version: ns-3.16   
Hardware: PC   
OS: Linux   

Description Junling Bu 2013-04-20 07:48:57 UTC
here is a small bug in src/wifi/examples/wifi-phy-test.c
in line 126:  Simulator::Run ();
   line 127:  return m_output;
here needs   Simulator::Destroy();

and also 
in line 268:  Simulator::Run ();
   line 269:  return m_output;
here also needs Simulator::Destroy();

if we do not fix it, when run example :
./ns3.16-wifi-phy-test-debug  SizeVsRange 
here will be crashed , print error:
assert failed. cond="!m_state->IsStateTx () && !m_state->IsStateSwitching ()", file=../src/wifi/model/yans-wifi-phy.cc, line=507
terminate called without an active exception

so I debug code ,find that before a new simulation start, we should destroy the old simualtion.
And this bug still exist in current ns3-dev, not only ns-3.16
Comment 1 Tommaso Pecorella 2013-04-20 08:52:17 UTC
verified, proposed solution works.
Comment 2 Tommaso Pecorella 2013-04-20 08:58:45 UTC
Fixed in changeset: 9709:00ed307fd7b5