Bug 1436

Summary: Wimax simulation does not work with more than two base stations
Product: ns-3 Reporter: Abhishek Chanda <abhishek.lists>
Component: wimaxAssignee: Flavio Kubota <kubota>
Status: RESOLVED WORKSFORME    
Severity: major CC: abhishek.lists, ns-bugs, tomh
Priority: P3    
Version: ns-3.13   
Hardware: All   
OS: All   
Attachments: Minor change to wimax-simple.cc

Description Abhishek Chanda 2012-05-25 12:34:32 UTC
Created attachment 1401 [details]
Minor change to wimax-simple.cc

The wimax module does not work with more than two base stations. Attached the simulation script which is a minor modification to wimax-simple.cc. GDB sessions output:

(gdb) r
Starting program: /Users/rony/Desktop/ns-allinone-3.13/ns-3.13/build/src/wimax/examples/wimax-simple \<args\>
Reading symbols for shared libraries +++++++++++++++........................... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00000001000ccc58 in ns3::SSRecord::GetMacAddress (this=0x0) at ss-record.cc:118
118	  return m_macAddress;
(gdb) bt
#0  0x00000001000ccc58 in ns3::SSRecord::GetMacAddress (this=0x0) at ss-record.cc:118
#1  0x0000000100101873 in ns3::SSManager::GetMacAddress (this=0x101c72df0, cid=@0x7fff5fbfde38) at ss-manager.cc:160
#2  0x0000000100077e18 in ns3::BaseStationNetDevice::DoReceive (this=0x101c72b30, packet=@0x7fff5fbfe438) at bs-net-device.cc:747
#3  0x000000010004ca51 in ns3::WimaxNetDevice::Receive (this=0x101c72b30, burst=@0x7fff5fbfe4b8) at wimax-net-device.cc:518
#4  0x0000000100059b92 in ns3::MemPtrCallbackImpl<ns3::WimaxNetDevice*, void (ns3::WimaxNetDevice::*)(ns3::Ptr<ns3::PacketBurst const>), void, ns3::Ptr<ns3::PacketBurst const>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator() (this=0x101c60140, a1=@0x7fff5fbfe518) at callback.h:223
#5  0x00000001000f523c in ns3::Callback<void, ns3::Ptr<ns3::PacketBurst const>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator() (this=0x7fff5fbfe570, a1=@0x7fff5fbfe568) at callback.h:410
#6  0x00000001000e6e91 in ns3::SimpleOfdmWimaxPhy::EndReceive (this=0x101c5fba0, burst=@0x7fff5fbfe600) at simple-ofdm-wimax-phy.cc:465
#7  0x00000001000e38b3 in ns3::EventImpl* ns3::MakeEvent<void (ns3::SimpleOfdmWimaxPhy::*)(ns3::Ptr<ns3::PacketBurst const>), ns3::SimpleOfdmWimaxPhy*, ns3::Ptr<ns3::PacketBurst> >(void (ns3::SimpleOfdmWimaxPhy::*)(ns3::Ptr<ns3::PacketBurst const>), ns3::SimpleOfdmWimaxPhy*, ns3::Ptr<ns3::PacketBurst>)::EventMemberImpl1::Notify () at make-event.h:124
#8  0x00000001016b1f1a in ns3::EventImpl::Invoke (this=0x101c9aa40) at event-impl.cc:39
#9  0x00000001016ba214 in ns3::DefaultSimulatorImpl::ProcessOneEvent (this=0x101c23ee0) at default-simulator-impl.cc:129
#10 0x00000001016ba274 in ns3::DefaultSimulatorImpl::Run (this=0x101c23ee0) at default-simulator-impl.cc:159
#11 0x00000001016b3952 in ns3::Simulator::Run () at simulator.cc:163
#12 0x0000000100003a74 in main (argc=2, argv=0x7fff5fbffa50) at wimax-simple.cc:193
(gdb) frame 0
#0  0x00000001000ccc58 in ns3::SSRecord::GetMacAddress (this=0x0) at ss-record.cc:118
118	  return m_macAddress;
(gdb) frame 1
#1  0x0000000100101873 in ns3::SSManager::GetMacAddress (this=0x101c72df0, cid=@0x7fff5fbfde38) at ss-manager.cc:160
160	  return GetSSRecord (cid)->GetMacAddress ();
Comment 1 Tom Henderson 2012-06-02 10:36:27 UTC
Your provided test case runs cleanly for me against the current tip of ns-3-dev.  Can you double check this or provide more information about your environment (which version of ns-3)?
Comment 2 Tom Henderson 2012-06-02 11:18:36 UTC
Note, the test program also ran fine for me in ns-3.13 on a fedora machine.
Comment 3 Tom Henderson 2013-04-26 17:49:53 UTC
closing due to lack of more information