<div dir="auto">Greetings all,<div dir="auto"><br></div><div dir="auto">Hopefully someone has some insight in this.  It seems like a truly bizarre place for a segfault to occur.</div><div dir="auto"><br></div><div dir="auto">Thanks</div><div dir="auto"><br></div><div dir="auto">John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Apr 3, 2017 12:21 AM, "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="auto"><span style="font-family:sans-serif;font-size:13.696px">Greetings all,</span><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto">I've updated my Github repository with the updated code:</div><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><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">ndnSIM-strategy1</span></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><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 style="font-family:sans-serif;font-size:13.696px" dir="auto">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 style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto">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 style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto">I am able to print (using cout) just before the assignment occurs, but it seems the segfault happens right then.</div><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto">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 style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto">So I don't think it's the parameter (or argument) being passed in. </div><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto">Any assistance would be appreciated.  This may be some peculiar smart pointer issue, but I'm not sure.</div><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto">Thanks,</div><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:13.696px" dir="auto">John</div></div>
</blockquote></div></div>