[Boost-bugs] [Boost C++ Libraries] #4842: "pure virtual method called; terminate called without an active exception" on shutdown

Subject: [Boost-bugs] [Boost C++ Libraries] #4842: "pure virtual method called; terminate called without an active exception" on shutdown
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-11 19:42:40


#4842: "pure virtual method called; terminate called without an active exception"
on shutdown
-------------------------------------+--------------------------------------
 Reporter: eric_niebler | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.44.0 | Severity: Regression
 Keywords: serialization singleton |
-------------------------------------+--------------------------------------
 On 11/11/2010 6:32 AM, Ruediger Berlich wrote:
> Hi again,
>
> here is an update: I have now also tested the behaviour below ("pure
 virtual
> method called; terminate called without an active exception" -> related
 to
> Boost.Serialization) with Boost 1.44 and see the same problem. This does
 not
> happen with 1.43.
>
> Anyway, I thought it might be important to know that whatever causes
 this
> wasn't introduced with 1.45 but 1.44 (and of course I might be doing
> something wrong which only triggers now due to 1.44's changes in the
> serialization library).
>
> Thanks and Best Regards,
> Ruediger
>
>
> Ruediger Berlich wrote:
>> Dear all,
>> here are a few experiences with the beta:
>>
>> Beman Dawes wrote:
>> [...]
>>> Please download the beta, give it a try, and report any problems you
>>> encounter.
>>
>> Platform:
>> =========
>> Kubuntu 10.10 64 bit, g++ 4.4.5
>>
>> Compilation:
>> ============
>> Runs mostly smoothely, albeit with many warnings of the type:
>>
>> [...]
>> libs/program_options/src/parsers.cpp:233: instantiated from here
>> ./boost/function/function_base.hpp:321: warning: dereferencing type-
 punned
>> pointer will break strict-aliasing rules
>> ./boost/function/function_base.hpp:325: warning: dereferencing type-
 punned
>> pointer will break strict-aliasing rules
>> [...]
>>
>> This is not a new situation and has been there with many prior
 versions.
>> It happens in different components.
>>
>> Compiling a complex application
>> ===============================
>> (The Geneva library's trunk version, close to version 0.85, see
>> http://launchpad.net/geneva ; depends on probably a dozen different
 boost
>> libraries)
>>
>> In order to get it to compile I hat to make a single change:
>> I had to add "#include <boost/serialization/nvp.hpp>" prior to the
>> inclusion of the date_time libraries in a single file (out of some 65
>> headers, some of which also include date_time), or else I would get
>> messages of the type
>>
>> /opt/boost145/include/boost/date_time/gregorian/greg_serialize.hpp: In
>> function ‘void boost::serialization::save(Archive&, const
>> boost::gregorian::date&, unsigned int)’:
>> /opt/boost145/include/boost/date_time/gregorian/greg_serialize.hpp:58:
>> error: there are no arguments to ‘make_nvp’ that depend on a template
>> parameter, so a declaration of ‘make_nvp’ must be available
>>
>> I _do_ serialize date_time objects in my application. This is new with
>> Boost 1.45 (compared with 1.43).
>>
>> Running the application
>> =======================
>>
>> When running the application in serial. multithreaded or networked mode
>> (Geneva does distributed parametric optimization, but also allows
>> multithreaded optimization and has a serial mode for debugging), I get
 the
>> error:
>>
>> [...]
>> 1000: 4.99999977648258e-05
>> End of optimization reached
>> Done ...
>> pure virtual method called
>> terminate called without an active exception
>> Aborted
>>
>> "Done" is printed at the end of main(), so there are only some
 singletons
>> left to clean up, one of which stems from the Boost.Serialization
 library,
>> AFAIK.
>>
>> Running the application in gdb yields:
>>
>> /********************************************************/
>> (gdb) up
>> !#1 0x00007ffff40726b0 in abort () at abort.c:92
>> 92 abort.c: No such file or directory.
>> in abort.c
>> (gdb) up
>> !#2 0x00007ffff49126bd in !__gnu_cxx::!__verbose_terminate_handler()
 () from
>> /usr/lib/libstdc++.so.6
>> (gdb) up
>> !#3 0x00007ffff4910906 in ?? () from /usr/lib/libstdc++.so.6
>> (gdb) up
>> !#4 0x00007ffff4910933 in std::terminate() () from
 /usr/lib/libstdc++.so.6
>> (gdb) up
>> !#5 0x00007ffff491128f in !__cxa_pure_virtual () from
>> #/usr/lib/libstdc++.so.6
>> (gdb) up
>> !#6 0x00007ffff4fc1f16 in
 boost::serialization::void_cast_detail::void_caster::operator<(boost::serialization::void_cast_detail::void_caster
>> const&) const () from
 /opt/boost145/lib/libboost_serialization.so.1.45.0
>> (gdb) up
>> !#7 0x00007ffff4fc282d in
 boost::serialization::void_cast_detail::void_caster::recursive_unregister()
 const
>> () from /opt/boost145/lib/libboost_serialization.so.1.45.0
>> (gdb) up
>> !#8 0x00007ffff4fc2f27 in
 boost::serialization::void_cast_detail::void_caster_shortcut::~void_caster_shortcut()
>> () from /opt/boost145/lib/libboost_serialization.so.1.45.0
>> (gdb) up
>> !#9 0x00007ffff4fc289f in
 boost::serialization::void_cast_detail::void_caster::recursive_unregister()
 const
>> () from /opt/boost145/lib/libboost_serialization.so.1.45.0
>> (gdb) up
>> !#10 0x00007ffff72ad64f in
 boost::serialization::void_cast_detail::void_caster_primitive<Gem::Geneva::GPersonalityTraits,
 Gem::Geneva::GObject>::~void_caster_primitive (this=0x7ffff7bb7e80,
>> !__in_chrg=<value optimized out>) at
>> /opt/boost145/include/boost/serialization/void_cast.hpp:198
>> 198 recursive_unregister();
>> (gdb) up
>> !#11 0x00007ffff72ad7be in
 boost::serialization::detail::singleton_wrapper<boost::serialization::void_cast_detail::void_caster_primitive<Gem::Geneva::GPersonalityTraits,
>> Gem::Geneva::GObject>::~singleton_wrapper (
>> this=0x7ffff7bb7e80, !__in_chrg=<value optimized out>)
>> at /opt/boost145/include/boost/serialization/singleton.hpp:111
>> 111 m_is_destroyed = true;
>> (gdb) up
>> !#12 0x00007ffff40748c0 in !__cxa_finalize (d=0x7ffff7baa2d0) at
>> cxa_finalize.c:56
>> 56 cxa_finalize.c: No such file or directory.
>> in cxa_finalize.c
>> (gdb) up
>> !#13 0x00007ffff7016366 in !__do_global_dtors_aux ()
>> from
>> /home/rberlich/geneva-build/src/geneva/libgemfony-geneva.so.0.8.5rc0
>> (gdb) up
>> !#14 0x0000000000000000 in ?? ()
>> (gdb) up
>> Initial frame selected; you cannot go up.
>> /********************************************************/
>>
>> Gem::Geneva::GPersonalityTraits is a purely virtual class, marked as
 such
>> with the following code:
>> "BOOST_SERIALIZATION_ASSUME_ABSTRACT(Gem::Geneva::GPersonalityTraits)"
 .
>> GObject is the base class of all optimization-related classes.
>>
>> The exact same code compiles and runs fine with Boost 1.43, the last
>> version I have been using excessively. I cannot really comment on Boost
>> 1.44 , but would be happy to try if it helps.
>>
>> Note that the above problem does not seem to have any influence on the
>> results of the program. The problems only appear at the very end of the
>> execution, when various singletons get destroyed.
>>
>> Best Regards,
>> Ruediger

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4842>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC