[ndnSIM] Error getting node index (GetContext)

Mateus Sousa mateus.aluufc at gmail.com
Fri Oct 6 06:26:20 PDT 2017


It works! Thank you a lot.


2017-10-05 19:36 GMT-03:00 Mateus Sousa <mateus.aluufc at gmail.com>:

> Ok, I'll check and send feedback.
>
> Thank you!
>
> 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,
>>> line=209
>>> 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...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20171006/c952a906/attachment.html>


More information about the ndnSIM mailing list