Boost C++ Libraries: Ticket #9412: Error message hidden by assert https://svn.boost.org/trac10/ticket/9412 <p> I received the following run-time error: </p> <p> Assertion failed: (<span class="underline">null != bpos), function save, file /opt/local/include/boost/archive/detail/oserializer.hpp, line 436. </span></p> <p> This is caused by the following lines: </p> <pre class="wiki"> // since true_type is valid, and this only gets made if the // pointer oserializer object has been created, this should never // fail const basic_pointer_oserializer * bpos = static_cast&lt;const basic_pointer_oserializer *&gt;( boost::serialization::singleton&lt; archive_serializer_map&lt;Archive&gt; &gt;::get_const_instance().find(*true_type) ); BOOST_ASSERT(NULL != bpos); if(NULL == bpos) boost::serialization::throw_exception( archive_exception( archive_exception::unregistered_class, "derived class not registered or exported" ) ); </pre><p> Instead of the BOOST_ASSERT, I would have preferred to receive the respective error message. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9412 Trac 1.4.3 anonymous Sat, 30 Nov 2013 01:35:40 GMT type changed https://svn.boost.org/trac10/ticket/9412#comment:1 https://svn.boost.org/trac10/ticket/9412#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> </ul> <p> Hmmm the ASSERT is there because this condition indicates some coding error in the serialization library. Throwing away the ASSERT effectively hides the error - which is not a good long term strategy. The most interesting question is why does this condition appear? What coding error which provoked it. </p> Ticket Robert Ramey Sat, 30 Nov 2013 01:38:02 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9412#comment:2 https://svn.boost.org/trac10/ticket/9412#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> Ticket