<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="">Hi John,<div class=""><br class=""></div><div class="">as Ashlesh mentioned, please post a gdb backtrace, so that we can take a look.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Apr 10, 2017, at 1:20 PM, Ashlesh Gawande (agawande) <<a href="mailto:agawande@memphis.edu" class="">agawande@memphis.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: 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; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Perhaps you can post the gdb backtrace so that other people can take a look.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Ashlesh</div></div><hr tabindex="-1" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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; display: inline-block; width: 776.15625px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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; float: none; display: inline !important;" class=""></span><div id="divRplyFwdMsg" dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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;" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>ndnSIM <<a href="mailto:ndnsim-bounces@lists.cs.ucla.edu" class="">ndnsim-bounces@lists.cs.ucla.edu</a>> on behalf of John Baugh <<a href="mailto:jpbaugh@umich.edu" class="">jpbaugh@umich.edu</a>><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Monday, April 10, 2017 2:55:10 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>ndnsim<br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [ndnSIM] SIGSEGV when simply assigning one smart pointer to another?</font><div class=""> </div></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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;" class=""><div dir="auto" class="">I think maybe I'm mailing the list when no one is awake :)<div dir="auto" class=""><br class=""></div><div dir="auto" class="">If anyone has any ideas, I'd be very interested in hearing them. This is a true Heisenbug</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Apr 9, 2017 11:36 PM, "John Baugh" <<a href="mailto:jpbaugh@umich.edu" class="">jpbaugh@umich.edu</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr" class=""><span style="font-family: sans-serif; font-size: 13.696px;" class="">Greetings all,</span><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">I posted this question before but received no responses, so I figured I'd give it another shot.</div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">I've updated my Github repository with the updated code:</div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><span style="color: rgb(88, 96, 105); font-family: -apple-system, blinkmacsystemfont, 'segoe ui', helvetica, arial, sans-serif, 'apple color emoji', 'segoe ui emoji', 'segoe ui symbol'; font-size: 18px;" class="">profjpbaugh</span><span style="color: rgb(88, 96, 105); font-family: -apple-system, blinkmacsystemfont, 'segoe ui', helvetica, arial, sans-serif, 'apple color emoji', 'segoe ui emoji', 'segoe ui symbol'; font-size: 18px; margin: 0px 0.25em;" class="">/</span><span style="color: rgb(88, 96, 105); font-family: -apple-system, blinkmacsystemfont, 'segoe ui', helvetica, arial, sans-serif, 'apple color emoji', 'segoe ui emoji', 'segoe ui symbol'; font-size: 18px; font-weight: 600;" class=""><span class="m_1575936426141092427gmail-il">ndnSIM</span>-strategy1</span></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><span style="color: rgb(88, 96, 105); font-family: -apple-system, blinkmacsystemfont, 'segoe ui', helvetica, arial, sans-serif, 'apple color emoji', 'segoe ui emoji', 'segoe ui symbol'; font-size: 18px; font-weight: 600;" class=""><br class=""></span></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">The scenario in question is <b class="">jpb-pop1</b>. The offending code seems to be when I pass my PopularityManager object to a set method, and then do the actual assignment. I created the PopularityManager as an adapter object (and go-between) between the PStrat (strategy) and the PopularityPolicy (policy). <br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">In order to establish my definition of "popularity", I require the interest information (which PStrat has), and to control caching / replacement ultimately (which is in PopularityPolicy), I need this information about interests.</div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">I am able to print (using cout) just before the assignment occurs, but it seems the segfault happens right then.</div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">I used GDB and it does indeed say there's a SIGSEGV, but I cannot for the life of me figure out why this is happening. It happens if I try to set the data member (popularityManager) to anything.</div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">So I don't think it's the parameter (or argument) being passed in. </div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">Any assistance would be appreciated. This may be some peculiar smart pointer issue, but I'm not sure.</div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">Thanks,</div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class=""><br class=""></div><div dir="auto" style="font-family: sans-serif; font-size: 13.696px;" class="">John</div></div></blockquote></div></div></div><br class=""></div></blockquote></div><br class=""></div></body></html>