When I run under gdb and look at the backtrace, this is what I'm getting....
(gdb) backtrace
#0 0x00007ffff2f4de4e in std::__detail::_List_node_base::_M_unhook() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007ffff73fcd56 in std::__cxx11::list<ns3::Ptr<ns3::WifiMacQueueItem>, std::allocator<ns3::Ptr<ns3::WifiMacQueueItem> > >::_M_erase (this=0x555555826650, __position=Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer':
) at /usr/include/c++/9/bits/stl_list.h:1918
#2 0x00007ffff73fb6db in std::__cxx11::list<ns3::Ptr<ns3::WifiMacQueueItem>, std::allocator<ns3::Ptr<ns3::WifiMacQueueItem> > >::erase
(this=0x555555826650, Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer':
__position=) at /usr/include/c++/9/bits/list.tcc:158
#3 0x00007ffff756c50d in ns3::BlockAckManager::HandleInFlightMpdu (this=0x555555736fa0, Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer':
mpduIt=,
status=ns3::BlockAckManager::ACKNOWLEDGED, Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer':
it=..., now=...) at ../src/wifi/model/block-ack-manager.cc:390
#4 0x00007ffff756d7f4 in ns3::BlockAckManager::NotifyGotAck (this=0x555555736fa0, mpdu=...)
at ../src/wifi/model/block-ack-manager.cc:452
#5 0x00007ffff738d5d1 in ns3::HtFrameExchangeManager::NotifyReceivedNormalAck (this=0x555555738bd0, mpdu=...)
at ../src/wifi/model/ht/ht-frame-exchange-manager.cc:540
#6 0x00007ffff7371462 in ns3::FrameExchangeManager::ReceivedNormalAck (this=0x555555738bd0, mpdu=..., txVector=..., ackTxVector=...,
rxInfo=..., snr=2131.4668261754341) at ../src/wifi/model/frame-exchange-manager.cc:1128
#7 0x00007ffff73702a6 in ns3::FrameExchangeManager::ReceiveMpdu (this=0x555555738bd0, mpdu=..., rxSignalInfo=..., txVector=...,
inAmpdu=false) at ../src/wifi/model/frame-exchange-manager.cc:1080
#8 0x00007ffff73843aa in ns3::QosFrameExchangeManager::ReceiveMpdu (this=0x555555738bd0, mpdu=..., rxSignalInfo=..., txVector=...,
inAmpdu=false) at ../src/wifi/model/qos-frame-exchange-manager.cc:717
#9 0x00007ffff739b0a4 in ns3::HtFrameExchangeManager::ReceiveMpdu (this=0x555555738bd0, mpdu=..., rxSignalInfo=..., txVector=...,
inAmpdu=false) at ../src/wifi/model/ht/ht-frame-exchange-manager.cc:1385
#10 0x00007ffff736d485 in ns3::FrameExchangeManager::Receive (this=0x555555738bd0, psdu=..., rxSignalInfo=..., txVector=...,
perMpduStatus=std::vector<bool> of length 1, capacity 64 = {...}) at ../src/wifi/model/frame-exchange-manager.cc:941
#11 0x00007ffff7377b87 in ns3::MemPtrCallbackImpl<ns3::FrameExchangeManager*, void (ns3::FrameExchangeManager::*)(ns3::Ptr<ns3::WifiPsdu>, ns3::RxSignalInfo, ns3::WifiTxVector, std::vector<bool, std::allocator<bool> >), void, ns3::Ptr<ns3::WifiPsdu>, ns3::RxSignalInfo, ns3::WifiTxVector, std::vector<bool, std::allocator<bool> >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator() (
this=0x5555557391c0, a1=..., a2=..., a3=..., a4=std::vector<bool> of length 1, capacity 64 = {...}) at ./ns3/callback.h:657
#12 0x00007ffff72dc318 in ns3::Callback<void, ns3::Ptr<ns3::WifiPsdu>, ns3::RxSignalInfo, ns3::WifiTxVector, std::vector<bool, std::allocator<bool> >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator() (this=0x555555734190, a1=..., a2=..., a3=...,
a4=std::vector<bool> of length 1, capacity 64 = {...}) at ./ns3/callback.h:1441
#13 0x00007ffff72d77ca in ns3::WifiPhyStateHelper::SwitchFromRxEndOk (this=0x5555557340a0, psdu=..., rxSignalInfo=..., txVector=...,
staId=65535, statusPerMpdu=std::vector<bool> of length 1, capacity 64 = {...}) at ../src/wifi/model/wifi-phy-state-helper.cc:499
#14 0x00007ffff7614f7e in ns3::PhyEntity::EndReceivePayload (this=0x5555557349b0, event=...) at ../src/wifi/model/phy-entity.cc:657
#15 0x00007ffff76201ad in ns3::MakeEvent<void (ns3::PhyEntity::*)(ns3::Ptr<ns3::Event>), ns3::PhyEntity*, ns3::Ptr<ns3::Event> >(void (ns3::PhyEntity::*)(ns3::Ptr<ns3::Event>), ns3::PhyEntity*, ns3::Ptr<ns3::Event>)::EventMemberImpl1::Notify() (this=0x5555558105c0)
at ./ns3/make-event.h:405
I understood that the HandleInFlightMpdu function is getting a NULL pointer and that's throwing segmentation fault but I don't understand why is this occurring somewhere in the middle of the simulation. Also, I don't understand why are the Python Exceptions are arising in the C++ functional arguments.