[ndnSIM] Error getting node index (GetContext)

Junxiao Shi shijunxiao at email.arizona.edu
Thu Oct 5 13:10:44 PDT 2017


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/20171005/8b4f60dd/attachment.html>


More information about the ndnSIM mailing list