#554 Assertion `dynamic_cast<Target>(x) == x' failed

Latest Subversion
closed-fixed
nobody
None
5
2014-03-23
2014-02-04
Tom Reynolds
No

When starting, then quitting a r6826 Debug build on this Ubuntu 13.10 x86_64 system I always run into:

freeorion: /usr/include/boost/cast.hpp:97: Target boost::polymorphic_downcast(Source*) [with Target = HumanClientFSM*; Source = boost::statechart::state_machine<HumanClientFSM, IntroMenu>]: Assertion `dynamic_cast<Target>(x) == x' failed.

gdb -q -n -ex "bt" -batch freeorion core:

[..]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./freeorion'.
Program terminated with signal 6, Aborted.
#0  0x00007f1d8a0a8f77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: File or directory not found.
#0  0x00007f1d8a0a8f77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f1d8a0ac5e8 in __GI_abort () at abort.c:90
#2  0x00007f1d8a0a1d43 in __assert_fail_base (fmt=0x7f1d8a1f8f58 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xa52f63 "dynamic_cast<Target>(x) == x", file=file@entry=0xa52f47 "/usr/include/boost/cast.hpp", line=line@entry=97, function=function@entry=0xa5c060 <HumanClientFSM* boost::polymorphic_downcast<HumanClientFSM*, boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator> >(boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator>*)::__PRETTY_FUNCTION__> "Target boost::polymorphic_downcast(Source*) [with Target = HumanClientFSM*; Source = boost::statechart::state_machine<HumanClientFSM, IntroMenu>]") at assert.c:92
#3  0x00007f1d8a0a1df2 in __GI___assert_fail (assertion=0xa52f63 "dynamic_cast<Target>(x) == x", file=0xa52f47 "/usr/include/boost/cast.hpp", line=97, function=0xa5c060 <HumanClientFSM* boost::polymorphic_downcast<HumanClientFSM*, boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator> >(boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator>*)::__PRETTY_FUNCTION__> "Target boost::polymorphic_downcast(Source*) [with Target = HumanClientFSM*; Source = boost::statechart::state_machine<HumanClientFSM, IntroMenu>]") at assert.c:101
#4  0x0000000000571e18 in boost::polymorphic_downcast<HumanClientFSM*, boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator> > (x=0x2b17050) at /usr/include/boost/cast.hpp:97
#5  0x00000000005c3c30 in boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator>::context<HumanClientFSM> (this=0x2b17050) at /usr/include/boost/statechart/state_machine.hpp:559
#6  0x00000000005c0fd7 in boost::statechart::simple_state<IntroMenu, HumanClientFSM, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::context_impl_other_context::context_impl<HumanClientFSM, boost::statechart::simple_state<IntroMenu, HumanClientFSM, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0> > (stt=...) at /usr/include/boost/statechart/simple_state.hpp:683
#7  0x00000000005bf4a0 in boost::statechart::simple_state<IntroMenu, HumanClientFSM, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::context<HumanClientFSM> (this=0x30b1520) at /usr/include/boost/statechart/simple_state.hpp:242
#8  0x00000000005bef0c in IntroMenu::Client (this=0x30b1520) at /home/tomreyn/SCM/freeorion/FreeOrion/client/human/HumanClientFSM.h:112
#9  0x00000000005b9757 in IntroMenu::~IntroMenu (this=0x30b1520, __in_chrg=<optimized out>) at /home/tomreyn/SCM/freeorion/FreeOrion/client/human/HumanClientFSM.cpp:78
#10 0x00000000005b985a in IntroMenu::~IntroMenu (this=0x30b1520, __in_chrg=<optimized out>) at /home/tomreyn/SCM/freeorion/FreeOrion/client/human/HumanClientFSM.cpp:79
#11 0x000000000058f8eb in boost::statechart::intrusive_ptr_release<IntroMenu, HumanClientFSM, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0> (pBase=0x30b1520) at /usr/include/boost/statechart/simple_state.hpp:982
#12 0x000000000058b9fd in boost::intrusive_ptr<IntroMenu>::~intrusive_ptr (this=0x7fff664dc890, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/intrusive_ptr.hpp:96
#13 0x00000000005cd673 in boost::intrusive_ptr<IntroMenu>::operator= (this=0x7fff664dc910, rhs=0x0) at /usr/include/boost/smart_ptr/intrusive_ptr.hpp:134
#14 0x00000000005ccb2a in boost::statechart::simple_state<IntroMenu, HumanClientFSM, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::exit_impl (this=0x30b1520, pSelf=..., pOutermostUnstableState=..., performFullExit=false) at /usr/include/boost/statechart/simple_state.hpp:552
#15 0x00000000005cbafe in boost::statechart::simple_state<IntroMenu, HumanClientFSM, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::exit_impl (this=0x30b1520, pSelf=..., pOutermostUnstableState=..., performFullExit=false) at /usr/include/boost/statechart/simple_state.hpp:513
#16 0x0000000000579543 in boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator>::terminate_impl (this=0x2b17050, theState=..., performFullExit=false) at /usr/include/boost/statechart/state_machine.hpp:956
#17 0x00000000005713cd in boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator>::terminate_impl (this=0x2b17050, performFullExit=false) at /usr/include/boost/statechart/state_machine.hpp:924
#18 0x00000000005bf973 in boost::statechart::state_machine<HumanClientFSM, IntroMenu, std::allocator<void>, boost::statechart::null_exception_translator>::~state_machine (this=0x2b17050, __in_chrg=<optimized out>) at /usr/include/boost/statechart/state_machine.hpp:427
#19 0x00000000005caf11 in HumanClientFSM::~HumanClientFSM (this=0x2b17050, __in_chrg=<optimized out>) at /home/tomreyn/SCM/freeorion/FreeOrion/client/human/HumanClientFSM.h:82
#20 0x00000000005caf40 in HumanClientFSM::~HumanClientFSM (this=0x2b17050, __in_chrg=<optimized out>) at /home/tomreyn/SCM/freeorion/FreeOrion/client/human/HumanClientFSM.h:82
#21 0x000000000054e8ea in HumanClientApp::~HumanClientApp (this=0x7fff664dce00, __in_chrg=<optimized out>) at /home/tomreyn/SCM/freeorion/FreeOrion/client/human/HumanClientApp.cpp:266
#22 0x00000000005a9d05 in mainSetupAndRunOgre () at /home/tomreyn/SCM/freeorion/FreeOrion/client/human/chmain.cpp:315
#23 0x00000000005a5de5 in main (argc=1, argv=0x7fff664ddbc8) at /home/tomreyn/SCM/freeorion/FreeOrion/client/human/chmain.cpp:88

Discussion

  • Geoff Topping
    Geoff Topping
    2014-03-23

    • status: open --> closed-fixed
     
  • Geoff Topping
    Geoff Topping
    2014-03-23

    This has hopefully been fixed in SVN.