[ndnSIM] Forwarder class fragility when undergoing modification

John Baugh jpbaugh at umich.edu
Mon Jul 31 21:28:08 PDT 2017

Greetings ndnSIM friends,

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.

So, I was going to put two private data members (fields) into the
forwarder.hpp file in Forwarder class:
* contentHitCount
* contentMissCount

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.

But even *adding *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.

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.)

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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170801/e98aee65/attachment-0001.html>

More information about the ndnSIM mailing list