[ndnSIM] Error getting node index (GetContext)
mateus.aluufc at gmail.com
Thu Oct 5 15:36:59 PDT 2017
Ok, I'll check and send feedback.
2017-10-05 17:10 GMT-03:00 Junxiao Shi <shijunxiao at email.arizona.edu>:
> Hi Mateus
> You are trying to retrieve node -1 that does not exist.
> Simulator::GetContext would return -1 if it was invoked during
> initialization or through Simulator::Schedule. Use
> Simulator::ScheduleWithContext to avoid this situation.
> Yours, Junxiao
> On Fri, Oct 6, 2017 at 00:25 Mateus Sousa <mateus.aluufc at gmail.com> wrote:
>> Hi all,
>> 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:
>> 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,
>> terminate called without an active exception
>> I'm calling this function in 'MulticastStrategy::afterReceiveInterest'
>> (ns3::Simulator::GetContext()). Can someone explain this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM