MantisBT - VCMI
View Issue Details
0002955VCMIGUI - Otherpublic2018-04-07 08:252018-04-08 12:38
hkoehler 
hkoehler 
normalcrashrandom
resolvedfixed 
0.99 
 
0002955: Crash while saving game
#0 0x00007fd0b8b66c37 in raise () from /usr/lib64/libc.so.6
#1 0x00007fd0b8b6a028 in abort () from /usr/lib64/libc.so.6
0000002 0x00007fd0b8ba32a4 in ?? () from /usr/lib64/libc.so.6
0000003 0x00007fd0b8bae007 in ?? () from /usr/lib64/libc.so.6
0000004 0x00007fd0b94b01e6 in std::ios_base::_M_dispose_callbacks() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000005 0x00007fd0b94b0231 in std::ios_base::~ios_base() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000006 0x000000000046534d in boost::io::detail::put<char, std::char_traits<char>, std::allocator<char>, boost::io::detail::put_holder<char, std::char_traits<char> > const&> (x=..., specs=..., res=...,
    buf=..., loc_p=<optimized out>) at /usr/local/include/boost/format/feed_args.hpp:174
0000007 0x00000000004656fa in boost::io::detail::distribute<char, std::char_traits<char>, std::allocator<char>, boost::io::detail::put_holder<char, std::char_traits<char> > const&> (self=..., x=...)
    at /usr/local/include/boost/format/feed_args.hpp:291
0000008 0x000000000046576a in boost::io::detail::feed_impl<char, std::char_traits<char>, std::allocator<char>, boost::io::detail::put_holder<char, std::char_traits<char> > const&> (self=..., x=...)
    at /usr/local/include/boost/format/feed_args.hpp:301
0000009 0x00000000005be7be in boost::io::detail::feed<char, std::char_traits<char>, std::allocator<char>, unsigned int&> (x=@0x7fff1246303c: 0, self=...) at /usr/local/include/boost/format/feed_args.hpp:313
0000010 boost::basic_format<char, std::char_traits<char>, std::allocator<char> >::operator%<unsigned int> (x=@0x7fff1246303c: 0, this=0x7fff12463090) at /usr/local/include/boost/format/format_class.hpp:68
0000011 vstd::CLoggerBase::makeFormat<unsigned int> (this=0x14602b0, t=<optimized out>, fmt=...) at /home/hkoehler/dev/vcmi/vcmi/include/vstd/CLoggerBase.h:142
0000012 vstd::CLoggerBase::makeFormat<char const*, unsigned int> (this=0x14602b0, t=<optimized out>, fmt=...) at /home/hkoehler/dev/vcmi/vcmi/include/vstd/CLoggerBase.h:149
0000013 vstd::CLoggerBase::log<char const*, unsigned int> (this=this@entry=0x14602b0, level=level@entry=ELogLevel::TRACE, format=..., t=t@entry=0x6c7ac8 <typeinfo name for SaveGame> "8SaveGame",
    args#0=args#0@entry=0) at /home/hkoehler/dev/vcmi/vcmi/include/vstd/CLoggerBase.h:71
0000014 0x000000000059d7b9 in vstd::CLoggerBase::trace<char const*, unsigned int> (t=0x6c7ac8 <typeinfo name for SaveGame> "8SaveGame", format=..., this=0x14602b0)
    at /home/hkoehler/dev/vcmi/vcmi/include/vstd/CLoggerBase.h:135
0000015 CClient::sendRequest (this=this@entry=0x7fd084007c90, request=request@entry=0x7fff12463200, player=...) at /home/hkoehler/dev/vcmi/vcmi/client/Client.cpp:453
0000016 0x000000000059da6b in CClient::save (this=0x7fd084007c90, fname=...) at /home/hkoehler/dev/vcmi/vcmi/client/Client.cpp:269
0000017 0x000000000057f78c in CSavingScreen::<lambda()>::operator() (__closure=0x2647d70) at /home/hkoehler/dev/vcmi/vcmi/client/lobby/CSavingScreen.cpp:83
0000018 std::_Function_handler<void(), CSavingScreen::saveGame()::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/7/bits/std_function.h:316
0000019 0x0000000000553705 in std::function<void ()>::operator()() const (this=0x2647d70) at /usr/include/c++/7/bits/std_function.h:706
0000020 CFunctionList<void ()>::operator()<>() const (this=<optimized out>) at /home/hkoehler/dev/vcmi/vcmi/client/windows/../../lib/FunctionList.h:60
0000021 std::_Function_handler<void (), CFunctionList<void ()> >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/7/bits/std_function.h:316
0000022 0x00000000004bafed in std::function<void ()>::operator()() const (this=0x275a390) at /usr/include/c++/7/bits/std_function.h:706
0000023 CFunctionList<void ()>::operator()<>() const (this=0x25b1d28) at /home/hkoehler/dev/vcmi/vcmi/client/widgets/../../lib/FunctionList.h:60
0000024 CButton::onButtonClicked (this=0x25b1cf0) at /home/hkoehler/dev/vcmi/vcmi/client/widgets/Buttons.cpp:157
0000025 0x00000000004a1b6e in CGuiHandler::handleMouseButtonClick (this=this@entry=0x984900 <GH>, interestedObjs=..., btn=btn@entry=<incomplete type>, isPressed=isPressed@entry=false)
    at /home/hkoehler/dev/vcmi/vcmi/client/gui/CGuiHandler.cpp:370
0000026 0x00000000004a21bc in CGuiHandler::handleCurrentEvent (this=this@entry=0x984900 <GH>) at /home/hkoehler/dev/vcmi/vcmi/client/gui/CGuiHandler.cpp:343
0000027 0x00000000004a2893 in CGuiHandler::handleEvents (this=0x984900 <GH>) at /home/hkoehler/dev/vcmi/vcmi/client/gui/CGuiHandler.cpp:200
0000028 0x000000000061536e in CPlayerInterface::update (this=<optimized out>) at /home/hkoehler/dev/vcmi/vcmi/client/CPlayerInterface.cpp:1719
0000029 0x00000000004a15f2 in CGuiHandler::renderFrame (this=this@entry=0x984900 <GH>) at /home/hkoehler/dev/vcmi/vcmi/client/gui/CGuiHandler.cpp:458
0000030 0x0000000000449516 in mainLoop (this=<optimized out>, this=<optimized out>, this=<optimized out>, this=<optimized out>, this=<optimized out>, this=<optimized out>, this=<optimized out>,
    this=<optimized out>, this=<optimized out>, this=<optimized out>, this=<optimized out>, this=<optimized out>) at /home/hkoehler/dev/vcmi/vcmi/client/CMT.cpp:1317
0000031 main (argc=<optimized out>, argv=<optimized out>) at /home/hkoehler/dev/vcmi/vcmi/client/CMT.cpp:484
No tags attached.
Issue History
2018-04-07 08:25hkoehlerNew Issue
2018-04-07 12:32karlissNote Added: 0007568
2018-04-07 12:32karlissNote Edited: 0007568bug_revision_view_page.php?bugnote_id=7568#r3496
2018-04-07 12:36SXXNote Added: 0007569
2018-04-08 08:40karlissNote Added: 0007570
2018-04-08 12:38hkoehlerNote Added: 0007571
2018-04-08 12:38hkoehlerStatusnew => resolved
2018-04-08 12:38hkoehlerResolutionopen => fixed
2018-04-08 12:38hkoehlerAssigned To => hkoehler

Notes
(0007568)
karliss   
2018-04-07 12:32   
Found one problem. Default captures are EVIL. Local string path in CSavingScreen::saveGame() gets captured by reference. There is at least one more problem as it still crashes.

(0007569)
SXX   
2018-04-07 12:36   
@karliss it's certainly not the reason why it's crashes though.
(0007570)
karliss   
2018-04-08 08:40   
@hkoehler Can you test if it works for you after https://github.com/vcmi/vcmi/pull/445 [^] ? It may or may not be the same save crash.
(0007571)
hkoehler   
2018-04-08 12:38   
Can't reproduce anymore after the duplicate free fix.