<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 14, 2016, at 12:14 PM, Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" class="">shijunxiao@email.arizona.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">Hi Sabet</p><p dir="ltr" class="">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*.</p><p dir="ltr" class="">Yours, Junxiao</p>
<div class="gmail_extra"><br class=""><div class="gmail_quote">On Aug 13, 2016 10:37 PM, "Muhammad Hosain Abdollahi Sabet" <<a href="mailto:mhasabet@gmail.com" class="">mhasabet@gmail.com</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi,<br class=""><br class=""></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I have a custom application <i class="">"CustomApp". </i>I have put SendInterest() in public so I can call it from scenario, for testing purposes. With this snap:<br class=""><br class=""><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">  ndn::AppHelper app1("CustomApp");<br class="">  ApplicationContainer appCont = app1.Install(ConsNode);<br class=""><br class="">  Ptr<CustomApp> app1ptr = DynamicCast<CustomApp>(<wbr class="">appCont.Get(0));<br class="">  app1ptr->SendInterest();<br class=""></blockquote></div></div></blockquote></div></div></div></blockquote><div><br class=""></div><div>As Junxiao already pointed out, you cannot do this.  One of the reasons is that this code in main() function merely sets up the simulation.  The installed applications is "logically" installed on the node, and it doesn't necessarily has to start at the beginning of the simulation (it is just an accident that in your simulation it does, as you used the default start/stop times).</div><div><br class=""></div><div>I would recommend checking the example applications, e.g., <a href="http://ndnsim.net/2.1/applications.html#customer-example" class="">http://ndnsim.net/2.1/applications.html#customer-example</a>. You need two things,</div><div>- initiate application tasks only after StartApplication is called</div><div>- schedule send interest operation, not invoke it directly</div><div><br class=""></div><div>--</div><div>Alex</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_default" style="font-family:tahoma,sans-serif"><div class=""><br class=""></div><div class="">I'm getting:<br class=""><br class=""><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Command ['.../ns-3/build/scratch/<wbr class="">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>").<br class=""></blockquote><div class=""><br class=""></div><div class="">which buy following gdb(insight) I end up :<br class=""><br class=""><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">BOOST_ASSERT_MSG(!m_<wbr class="">isExecuting, "cannot emit signal from a handler");</blockquote><div class=""><br class=""> It is from:<br class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/master/src/util/signal-signal.hpp:224" target="_blank" class="">https://github.com/named-data-<wbr class="">ndnSIM/ndn-cxx/blob/master/<wbr class="">src/util/signal-signal.hpp:224</a><br class=""></div><div class="">Branch: ndn-cxx.0.3.4-ndnSIM<br class=""><br class=""></div><div class="">I have tested app1ptr with some sample doing-nothing-but-LOG member function and it worked.<br class=""><br class=""></div><div class="">I appreciate it if you could help me on what is wrong.<br class=""><br class=""></div><div class="">Thanks,<br class=""></div><div class="">Sabet<br class=""></div></div> <br class=""></div></div><div class=""><div data-smartmail="gmail_signature" class=""><div dir="ltr" class=""><br class=""></div></div></div>
</div>
<br class="">______________________________<wbr class="">_________________<br class="">
ndnSIM mailing list<br class="">
<a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class="">
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank" class="">http://www.lists.cs.ucla.edu/<wbr class="">mailman/listinfo/ndnsim</a><br class="">
<br class=""></blockquote></div></div>
_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br class=""></div></blockquote></div><br class=""></body></html>