<div dir="auto">Hi Mateus</div><div dir="auto"><br></div><div dir="auto">You are trying to retrieve node -1 that does not exist.</div><div dir="auto">Simulator::GetContext would return -1 if it was invoked during initialization or through Simulator::Schedule. Use Simulator::ScheduleWithContext to avoid this situation.</div><div dir="auto"><br></div><div dir="auto">Yours, Junxiao</div><br><div class="gmail_quote"><div>On Fri, Oct 6, 2017 at 00:25 Mateus Sousa <<a href="mailto:mateus.aluufc@gmail.com">mateus.aluufc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div>Hi all, <br><br></div>I'm facing a problem to retrieve the current node index in forwarding class. Sometimes it works, sometimes it doesn't and returns the following error message:<br><br>assert failed. cond="n < m_nodes.size ()", msg="Node index 4294967295 is out of range (only have 4 nodes).", file=../src/network/model/node-list.cc, line=209<br>terminate called without an active exception<br>.  <br><br></div>I'm calling this function in 'MulticastStrategy::afterReceiveInterest' (ns3::Simulator::GetContext()). Can someone explain this? <br><br></div></blockquote></div>