<div dir="ltr">Greetings again friends,<div><br></div><div>My apologies - please ignore the last e-mail.  Apparently I had a weird situation where the Policy object was nullptr and that was because I had some of my set methods out of order, and created some other objects in the wrong order.  It does seem a bit fragile for such a weird error to occur, but I think in this particular case, it's a C++ issue, not an ndnSIM issue.</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 1, 2017 at 12:28 AM, John Baugh <span dir="ltr"><<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Greetings ndnSIM friends,<div><br></div><div>This is more of a general question since it's happened multiple times.  I've managed to find various ways of working around the issue before, but I'm trying to get an idea of the root cause.  So, even though a more general question, I'll try and give my specific example.</div><div><br></div><div>So, I was going to put two private data members (fields) into the forwarder.hpp file in Forwarder class:</div><div>* contentHitCount</div><div>* contentMissCount</div><div><br></div><div>I assumed I could initialize them to zero in the constructor, increment them inside the respective onContentStoreHit and onContentStoreMiss methods inside Forwarder, and then I could obtain data from them.</div><div><br></div><div>But even <b>adding </b>one of these variables to the private data of the Forwarder class (and doing nothing else) causing a segmentation fault when the forwarding strategy is about to be set in the main simulation file.</div><div><br></div><div>This is the only thing I changed.  I added a private data member.  An integer.  Nothing else.  (Yes, I also tried with ctor initializer list to set it to 0, and to set it to 0 inside the ctor - same result.)</div><div><br></div><div>Is there some general fragility related to the Forwarder class that makes it difficult to modify?  It just seems like adding a variable shouldn't cause a SEGFAULT.</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div></div>
</blockquote></div><br></div>