<p dir="ltr">If anyone gets a chance to check the code I had attached and give me an idea about perhaps why the exception is occurring, what is the appropriate way to add items to CS etc, I'd greatly appreciate it.</p>
<p dir="ltr">Thanks</p>
<p dir="ltr">John</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Nov 7, 2016 12:38 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="ltr"><div><div><div><div><div><div><div>Greetings all,<br><br></div>I have written some code that I'm basically trying to use to just play around with the content store for the purpose of learning how to use it.  I figured I could create (or retrieve) an instance of it, and treat it mostly like a container/data structure and use the methods, such as insert on it.  I tried making my own custom Cs instance, and when that didn't work I used the technique Junxiao suggested by obtaining the L3Protocol, and then from that obtaining a forwarder and then getting the content store that way.<br><br></div>I assumed that once a content store was obtained, that I could do things like call "insert" on it directly.  <br><br></div>However, although what i have attached does compile, I get a termination error saying that the error was "bad weak_ptr".<br><br></div>I've spent several years not as focused on C++, so I will be the first to admit I'm not as up to speed on the smart/managed pointers as i should be, but i do know that weak_ptr is a type of associated smart pointer that doesn't own the object that it is referencing.  But even after using GDB, I still don't really know what's causing this problem.  Java and C# have spoiled me... I'll admit.  <br><br></div>Any help would be greatly appreciated.  I am beginning to put together notes and maybe some day in the near future I'll have a little sandbox tutorial for people to at least get use to the data structures and such with a more extensive treatment.  I'm a community college instructor, adjunct at U of M, as well as doing this PhD research, so once I truly understand this stuff better, I think I can really contribute especially in the form of instructional materials.<br><br></div>Thanks a ton, everyone.<br><br></div>John<br></div>
</blockquote></div></div>