<div dir="auto">I think maybe I'm mailing the list when no one is awake :)<div dir="auto"><br></div><div dir="auto">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><div class="gmail_quote">On Apr 9, 2017 11:36 PM, "John Baugh" <<a href="mailto:jpbaugh@umich.edu">jpbaugh@umich.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:sans-serif;font-size:13.696px">Greetings all,</span><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">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"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">I've updated my Github repository with the updated code:</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><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">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">/</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"><span class="m_1575936426141092427gmail-il">ndnSIM</span>-strategy1</span></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><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"><br></span></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">The scenario in question is <b>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></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">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"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">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"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">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"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">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"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">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"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">Thanks,</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">John</div></div>
</blockquote></div></div>