<html><head><meta http-equiv="Content-Type" content="text/html charset=GB2312"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi Kevin,</div><div><br></div><div>I tried to put</div><div><br></div><div><div>      std::cerr << metricFace.GetRoutingCost() << std::endl;</div><div>      </div></div><div>into DoPropagateInterest and then run ndn-simple scenario.  I got no errors or segfaults.</div><div><br></div><div>GetStatus/GetRoutingCost are the same type of the calls, accessing the same data structure in the same way.  So, not sure why you're getting the segfault.</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Dec 8, 2013, at 7:26 PM, <a href="mailto:xuxux2006@126.com">xuxux2006@126.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 14px; font-family: Î¢ÈíÑźÚ; line-height: 1.5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 10px;"><div>Hi Alex, Ilya and every ndnSIM users,</div><div>I found a problem in ndn-fib-entry.h. When I called the founction GetRoutingCost() of  ndn-fib-entry.h in DoPropagateInterest of <a href="http://flooding.cc/">flooding.cc</a><span class="Apple-converted-space"> </span>, I caught a SIGSEGV error. I did this just as<span class="Apple-converted-space"> </span><span class="keyword">previous</span> calling GetStatus() in  <a href="http://flooding.cc/">flooding.cc</a>.  The bt result of gdb about this error is listed below:</div><div>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div>#0  0xb4be06d4 in std::string::begin() () from /usr/lib/i386-linux-gnu/libstdc++.so.6<br>#1  0xb677dcb2 in boost::range_detail::range_begin<std::string> (c=...) at /usr/include/boost/range/begin.hpp:49<br>#2  0xb677d737 in boost::range_adl_barrier::begin<std::string> (r=...) at /usr/include/boost/range/begin.hpp:108<br>#3  0xb677cf61 in boost::iterator_range_detail::iterator_range_impl<__gnu_cxx::__normal_iterator<char*, std::string> >::adl_begin<std::string> (r=...) at /usr/include/boost/range/iterator_range_core.hpp:56<br>#4  0xb677c91e in boost::iterator_range<__gnu_cxx::__normal_iterator<char*, std::string> >::iterator_range<std::string> (<br>    this=0xbfffe010, r=...) at /usr/include/boost/range/iterator_range_core.hpp:204<br>#5  0xb677be9f in boost::make_iterator_range<std::string> (r=...) at /usr/include/boost/range/iterator_range_core.hpp:556<br>#6  0xb677b2c4 in boost::range_detail::make_range<std::string> (r=...) at /usr/include/boost/range/as_literal.hpp:93<br>#7  0xb677a4ee in boost::as_literal<std::string> (r=...) at /usr/include/boost/range/as_literal.hpp:102<br>#8  0xb6779663 in boost::algorithm::iter_split<std::vector<std::string, std::allocator<std::string> >, std::string, boost::algorithm::detail::token_finderF<boost::algorithm::detail::is_any_ofF<char> > > (Result=..., Input=..., Finder=...)<br>    at /usr/include/boost/algorithm/string/iter_find.hpp:153<br>#9  0xb677882f in boost::algorithm::split<std::vector<std::string, std::allocator<std::string> >, std::string, boost::algorithm::detail::is_any_ofF<char> > (Result=..., Input=..., Pred=..., eCompress=boost::algorithm::token_compress_off)<br>    at /usr/include/boost/algorithm/string/split.hpp:149<br>#10 0xb67768f8 in ns3::ndn::ConsumerCbr::SendPacket (this=0x8390390) at ../src/ndnSIM/apps/<a href="http://ndn-consumer-cbr.cc/">ndn-consumer-cbr.cc</a>:229<br>#11 0xb67779a9 in ns3::EventMemberImpl0::Notify (this=0x84fb408) at ./ns3/make-event.h:96<br>#12 0xb5035e4b in ns3::EventImpl::Invoke (this=0x84fb408) at ../src/core/model/<a href="http://event-impl.cc/">event-impl.cc</a>:45<br>#13 0xb5039f88 in ns3::DefaultSimulatorImpl::ProcessOneEvent (this=0x809a380) at ../src/core/model/<a href="http://default-simulator-impl.cc/">default-simulator-impl.cc</a>:138<br>#14 0xb503a1a8 in ns3::DefaultSimulatorImpl::Run (this=0x809a380) at ../src/core/model/<a href="http://default-simulator-impl.cc/">default-simulator-impl.cc</a>:193<br>#15 0xb5036c51 in ns3::Simulator::Run () at ../src/core/model/<a href="http://simulator.cc/">simulator.cc</a>:160<br>#16 0x08059c3f in main (argc=2, argv=0xbffff184) at ../src/ndnSIM/examples/<a href="http://ndn-tree-cs-tracers.cc/">ndn-tree-cs-tracers.cc</a>:473<br>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div> </div><div>I am confused, why the GetStatus() can be called here but the GetRoutingCost() can not?</div><div>Please help. I have tried several times, but still have this problem. Look forward your help.</div><div>Thanks & Regards</div><div><hr align="left" size="1" style="height: 1px; width: 210px;"></div><div>Kevin Xu</div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div><br></body></html>