[ndnSIM] Error while calling applications public member functions from scenario

Junxiao Shi shijunxiao at email.arizona.edu
Sun Aug 14 12:14:30 PDT 2016


Hi Sabet

This usually occurs when you are trying to send a packet when processing a
packet. You need a io.post in real application or
ns3::Simulator::ScheduleNow in simulated application *somewhere*.

Yours, Junxiao

On Aug 13, 2016 10:37 PM, "Muhammad Hosain Abdollahi Sabet" <
mhasabet at gmail.com> wrote:

> Hi,
>
> I have a custom application *"CustomApp". *I have put SendInterest() in
> public so I can call it from scenario, for testing purposes. With this snap:
>
>   ndn::AppHelper app1("CustomApp");
>>   ApplicationContainer appCont = app1.Install(ConsNode);
>>
>>   Ptr<CustomApp> app1ptr = DynamicCast<CustomApp>(appCont.Get(0));
>>   app1ptr->SendInterest();
>>
>
> I'm getting:
>
> Command ['.../ns-3/build/scratch/simple-custom-app'] terminated with
>> signal SIGSEGV. Run it under a debugger to get more information (./waf
>> --run <program> --command-template="gdb --args %s <args>").
>>
>
> which buy following gdb(insight) I end up :
>
> BOOST_ASSERT_MSG(!m_isExecuting, "cannot emit signal from a handler");
>
>
>  It is from:
> https://github.com/named-data-ndnSIM/ndn-cxx/blob/master/
> src/util/signal-signal.hpp:224
> Branch: ndn-cxx.0.3.4-ndnSIM
>
> I have tested app1ptr with some sample doing-nothing-but-LOG member
> function and it worked.
>
> I appreciate it if you could help me on what is wrong.
>
> Thanks,
> Sabet
>
>
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160814/7c92fa0e/attachment.html>


More information about the ndnSIM mailing list