<div dir="auto"><div dir="auto">Hi Muktadir<div dir="auto"><br></div><div dir="auto">I just found out that the problem came from the data refrence passed to onOutgoingData function. I think it was first created without make_shared.</div><div dir="auto"><br></div><div dir="auto">I solved it while troubleshooting by creating in the funtion a new instance of data object and "cloned" from the passed one using the getters and setters of Signature and Metainfo.</div><div dir="auto"><br></div><div dir="auto">I don't think this is the best way to operate. I might reach the data first call and make it shared, but this is all i have for the moment. Any other ideas would be great.</div><div dir="auto"><br></div><div dir="auto">Thank you</div><div dir="auto"><br></div><div dir="auto">Nabil</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 11 mai 2020 à 05:39, Muktadir R Chowdhury (mrchwdhr) <<a href="mailto:mrchwdhr@memphis.edu" target="_blank" rel="noreferrer">mrchwdhr@memphis.edu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Turn on the forwarder log of ndnSIM to see what's actually going on. If you can't find the problem, please share the log here. That will be helpful in debugging the problem.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
-Muktadir</div>
<div id="m_-6666325862293231027m_3073177153896781286appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-6666325862293231027m_3073177153896781286divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> ndnSIM <<a href="mailto:ndnsim-bounces@lists.cs.ucla.edu" rel="noreferrer noreferrer" target="_blank">ndnsim-bounces@lists.cs.ucla.edu</a>> on behalf of nabil khemache via ndnSIM <<a href="mailto:ndnsim@lists.cs.ucla.edu" rel="noreferrer noreferrer" target="_blank">ndnsim@lists.cs.ucla.edu</a>><br>
<b>Sent:</b> Sunday, May 10, 2020 11:35 AM<br>
<b>To:</b> <a href="mailto:ndnsim@lists.cs.ucla.edu" rel="noreferrer noreferrer" target="_blank">ndnsim@lists.cs.ucla.edu</a> <<a href="mailto:ndnsim@lists.cs.ucla.edu" rel="noreferrer noreferrer" target="_blank">ndnsim@lists.cs.ucla.edu</a>><br>
<b>Subject:</b> [ndnSIM] Data forwarding backoff</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi everyone,</div>
<div><br>
</div>
<div>i hope all of you are fine,</div>
<div><br>
</div>
<div>I'm trying one of the first forwarding mechanisms used in wireless networks: overhear and backoff forwarding</div>
<div><br>
</div>
<div><br>
</div>
<div>i used ns3::Simulator::Schedule to schedule the outface.sendInterest in the onOutgoingInterest function, and it works very well, i can see nodes keeping "silent".</div>
<div><br>
</div>
<div>But when i tried to use the same thing in the onOutgoingData with</div>
<div>ns3::Simulator::Schedule(ns3::MilliSeconds(rand()%2, &Face::sendData, &outFace, data)<br>
</div>
<div>i get a pointers related error "terminate called after throwing an instance of 'std::bad_weak_ptr'<br>
</div>
<div>  what():  bad_weak_ptr"</div>
<div><br>
</div>
<div>I don't have any idea which pointer is meant, and i'd be very pleased if anyone could give me a clue or another way to do it if i'm doing it wrong.</div>
<div><br>
</div>
<div>thanks in advance.</div>
<div><br>
</div>
<div>Best regards, Nabil<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>

</blockquote></div></div>