Boost C++ Libraries: Ticket #3673: boost python and weak_ptr from a shared_ptr argument https://svn.boost.org/trac10/ticket/3673 <p> if you save a weak_ptr of a shared_ptr passed to you by python, it expires almost immediately (see use of aliasing constructor in shared_ptr_from_python.hpp). See also mail from Jahn Fuchs on c++-sig list subject: boost python and weak_ptr from a shared_ptr argument </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3673 Trac 1.4.3 troy d. straszheim Thu, 26 Nov 2009 07:23:43 GMT owner, status changed https://svn.boost.org/trac10/ticket/3673#comment:1 https://svn.boost.org/trac10/ticket/3673#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Dave Abrahams</span> to <span class="trac-author">troy d. straszheim</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Olaf Lenz <olaf@…> Thu, 04 Mar 2010 14:13:28 GMT attachment set https://svn.boost.org/trac10/ticket/3673 https://svn.boost.org/trac10/ticket/3673 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">weak_ptr.cpp</span> </li> </ul> <p> Testcase for the problem </p> Ticket Olaf Lenz <olaf@…> Thu, 04 Mar 2010 14:14:10 GMT attachment set https://svn.boost.org/trac10/ticket/3673 https://svn.boost.org/trac10/ticket/3673 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">testWeakPtr.py</span> </li> </ul> <p> Python file of the test case </p> Ticket Olaf Lenz <olaf@…> Thu, 04 Mar 2010 14:25:00 GMT milestone changed https://svn.boost.org/trac10/ticket/3673#comment:2 https://svn.boost.org/trac10/ticket/3673#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.42.0</span> → <span class="trac-field-new">Boost 1.43.0</span> </li> </ul> <p> I provided a simple test case that demonstrates the problem. Just compile "weak_ptr.cpp", adapt the imports and run the python script, and you will get </p> <pre class="wiki">&gt; python testWeakPtr.py python: /home/olenz/projects/espresso++/src/trunk/contrib/boost/boost/smart_ptr/shared_ptr.hpp:409: T* boost::shared_ptr&lt; &lt;template-parameter-1-1&gt; &gt;::operator-&gt;() const [with T = A]: Assertion `px != 0' failed. Aborted </pre> Ticket eu@… Tue, 11 Jun 2013 18:43:30 GMT <link>https://svn.boost.org/trac10/ticket/3673#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3673#comment:3</guid> <description> <p> I confirm this bug with boost 1.49. Perhaps should be goal version updated? </p> </description> <category>Ticket</category> </item> <item> <author>eu@…</author> <pubDate>Tue, 11 Jun 2013 18:44:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3673#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3673#comment:4</guid> <description> <p> PS for the reference a post at stackoverflow dealing with this problem: <a class="ext-link" href="http://stackoverflow.com/questions/8233252/boostpython-and-weak-ptr-stuff-disappearing"><span class="icon">​</span>http://stackoverflow.com/questions/8233252/boostpython-and-weak-ptr-stuff-disappearing</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>