Bug 1635 - a small bug without Simulator::Destroy();
a small bug without Simulator::Destroy();
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3.16
PC Linux
: P5 normal
Assigned To: Nicola Baldo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-20 07:48 UTC by Junling Bu
Modified: 2013-04-20 08:58 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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