From 45fa206e65b650aef049867c6d02be68fcdc11c2 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Tue, 16 Aug 2022 16:25:20 +0200 Subject: [PATCH] wifi: Fix crash when logging RrMultiUserScheduler --- src/wifi/model/he/rr-multi-user-scheduler.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wifi/model/he/rr-multi-user-scheduler.cc b/src/wifi/model/he/rr-multi-user-scheduler.cc index b7b7c754c..dfaa49ab6 100644 --- a/src/wifi/model/he/rr-multi-user-scheduler.cc +++ b/src/wifi/model/he/rr-multi-user-scheduler.cc @@ -246,7 +246,7 @@ RrMultiUserScheduler::GetTxVectorForUlMu (Func canbeSolicited) if (txVector.GetHeMuUserInfoMap ().empty ()) { - // No suitable station + NS_LOG_DEBUG ("No suitable station"); return txVector; } @@ -659,7 +659,9 @@ RrMultiUserScheduler::TrySendingDlMuPpdu (void) void RrMultiUserScheduler::FinalizeTxVector (WifiTxVector& txVector) { - NS_LOG_FUNCTION (this << txVector); + // Do not log txVector because GetTxVectorForUlMu() left RUs undefined and + // printing them will crash the simulation + NS_LOG_FUNCTION (this); NS_ASSERT (txVector.GetHeMuUserInfoMap ().size () == m_candidates.size ()); // compute how many stations can be granted an RU and the RU size