Boost C++ Libraries: Ticket #1036: assert failure in oserializer.hpp:418 https://svn.boost.org/trac10/ticket/1036 <p> a.out: /usr/include/boost/archive/detail/oserializer.hpp:418: static void boost::archive::detail::save_pointer_type&lt;Archive, TPtr&gt;::polymorphic&lt;T&gt;::save(Archive&amp;, const T&amp;, const boost::archive::detail::basic_pointer_oserializer*) [with T = I, Archive = boost::archive::binary_oarchive, TPtr = I*]: Assertion `<span class="underline">null != bpos_ptr' failed. </span></p> <p> from oserializer.hpp: </p> <blockquote> <p> <em> sice true_type is valid, and this only gets made if the </em> pointer oserializer object has been created, this should never <em> fail bpos_ptr = archive_pointer_oserializer&lt;Archive&gt;::find(* true_type); assert(NULL != bpos_ptr); </em></p> </blockquote> <p> using ubuntu 7.04 64 bits (gcc 4.1.1) and boost 1.33.1 attached file is source code to raise it. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1036 Trac 1.4.3 anonymous Wed, 06 Jun 2007 23:25:53 GMT attachment set https://svn.boost.org/trac10/ticket/1036 https://svn.boost.org/trac10/ticket/1036 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">bugasert418.cpp</span> </li> </ul> Ticket Dave Abrahams Wed, 11 Jul 2007 01:08:22 GMT owner set https://svn.boost.org/trac10/ticket/1036#comment:1 https://svn.boost.org/trac10/ticket/1036#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Robert Ramey</span> </li> </ul> Ticket Robert Ramey Fri, 30 Nov 2007 04:57:56 GMT status changed https://svn.boost.org/trac10/ticket/1036#comment:2 https://svn.boost.org/trac10/ticket/1036#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I've reproduced this with that latest version. I'm investigating this. </p> <p> Robert Ramey </p> Ticket Robert Ramey Sun, 02 Dec 2007 06:16:30 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1036#comment:3 https://svn.boost.org/trac10/ticket/1036#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I have studied this interesting case and made changes such that the assertion is no longer invoked. </p> <p> However, there is another problem with this example which prevents it from working. The saving of T resolves to: </p> <p> T -&gt; A -&gt; E -&gt; C, I -&gt; *J (abstract base) -&gt; B </p> <p> But no instance of B as been yet serialized so it is not registered with the archive. This can be remedied by inverting a number of ways: </p> <p> a) the sequence A, B in serializaiton can be inverted<br /> b) using ar.register(...) to explicitly register B<br /> c) exporting B </p> Ticket