crashing in svn 5572

crashing in svn 5572

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

crashing in svn 5572

Post by lurker »

First we have a fun crash whenever anyone times out and the following line is called:
log.Message(format(PlayerLeft) %players[a]->name %" timeout");

Code: Select all

#0  0x77c35b62 in msvcrt!_assert () from /cygdrive/c/WINDOWS/system32/msvcrt.dll
#1  0x00baf0c0 in ZZN5boost6spirit4impl19object_with_id_baseINS1_11grammar_tagEjE17acquire_object_idEvE13static_supply (
)
#2  0x0a9aff64 in ?? ()
#3  0x003edbe0 in ?? ()
#4  0x0a9aff64 in ?? ()
#5  0x00bd79a6 in METAL_MAP_SQUARE_SIZE ()
#6  0x009b3075 in boost::detail::thread::lock_ops<boost::mutex>::unlock (m=@0xbd79a6)
    at mingwlibs/include/boost/thread/detail/lock.hpp:45
#7  0x00a17a12 in boost::scoped_ptr<GameParticipant>::operator-> (this=0x97610a4)
    at mingwlibs/include/boost/scoped_ptr.hpp:94
#8  0x00827b26 in CGameServer::ServerReadNet (this=0x9761050) at rts/Game/GameServer.cpp:763
#9  0x00824af4 in CGameServer::Update (this=0x9761050) at rts/Game/GameServer.cpp:354
#10 0x00828b40 in CGameServer::UpdateLoop (this=0x9761050) at rts/Game/GameServer.cpp:1035
#11 0x00a19297 in boost::_mfi::mf0<void, CGameServer>::operator() (this=0xa9aff5c, p=0x9761050)
    at mingwlibs/include/boost/bind/mem_fn_template.hpp:49
#12 0x009ae726 in boost::_bi::list1<boost::_bi::value<CGameServer*> >::operator()<boost::_mfi::mf0<void, CGameServer>, b
oost::_bi::list0> (this=0xa9aff64, f=@0xa9aff5c, a=@0xa9afdff) at mingwlibs/include/boost/bind.hpp:231
#13 0x009b0272 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, CGameServer>, boost::_bi::list1<boost::_bi::value<CGam
eServer*> > >::operator() (this=0xa9aff5c) at mingwlibs/include/boost/bind/bind_template.hpp:20
#14 0x009bb62f in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, CG
ameServer>, boost::_bi::list1<boost::_bi::value<CGameServer*> > >, void>::invoke (
    function_obj_ptr=@0xa9aff5c) at mingwlibs/include/boost/function/function_template.hpp:155
#15 0x00a1e637 in boost::function0<void, std::allocator<boost::function_base> >::operator() ()
    at rts/System/GlobalStuff.h:123
#16 0x009160e0 in thread_proxy@4 () at rts/System/GlobalStuff.h:123
#17 0x77c3a3b0 in msvcrt!_endthreadex () from /cygdrive/c/WINDOWS/system32/msvcrt.dll
#18 0x0022fac0 in ?? ()
#19 0x7c91b298 in wcsncat () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#20 0x003e0000 in ?? ()
#21 0x096ea660 in ?? ()
#22 0x00000000 in ?? ()

Second we have a nice mystery crash:

Code: Select all

0  SpringApp::SigAbrtHandler (unused=22) at rts/System/SpringApp.cpp:75
#1  0x77c352da in raise () from /cygdrive/c/WINDOWS/system32/msvcrt.dll
#2  0x00000016 in ?? ()
#3  0x0a9aff5c in ?? ()
#4  0x00baf0c0 in ZZN5boost6spirit4impl19object_with_id_baseINS1_11grammar_tagEjE17acquire_object_idEvE13static_supply (
)
#5  0x0fac8d40 in ?? ()
#6  0x0a9a5b54 in ?? ()
#7  0xffffffff in ?? ()
#8  0x003e4534 in ?? ()
#9  0x0a9a5ac0 in ?? ()
#10 0x00410cde in std::__verify_grouping () at rts/System/SpringApp.cpp:70
#11 0x77c36bc1 in msvcrt!abort () from /cygdrive/c/WINDOWS/system32/msvcrt.dll
#12 0x00000016 in ?? ()
#13 0x0000000a in ?? ()
#14 0x00946f52 in __cxxabiv1::__terminate ()
    at c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77
#15 0x00946f85 in std::terminate ()
    at c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77
#16 0x0093eca2 in __cxa_throw ()
    at c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77
#17 0x009a256c in boost::throw_exception<boost::io::bad_format_string> (e=@0xa9a5b88)
    at mingwlibs/include/boost/throw_exception.hpp:39
#18 0x009a6b75 in boost::io::detail::maybe_throw_exception (exceptions=255 'ÿ', pos=33, size=34)
    at mingwlibs/include/boost/format/parsing.hpp:106
#19 0x009a767e in boost::io::detail::parse_printf_directive<char, std::char_traits<char>, std::allocator<char>, __gnu_cx
x::__normal_iterator<char const*, std::string>, std::ctype<char> > (start=<incomplete type>,
    last=<incomplete type>, fpar=0xfb02788, fac=@0xd777d0, offset=32, exceptions=255 'ÿ')
    at mingwlibs/include/boost/format/parsing.hpp:333
#20 0x0099ed09 in boost::basic_format<char, std::char_traits<char>, std::allocator<char> >::parse (
    this=<incomplete type>, buf=@0xd700d8) at mingwlibs/include/boost/format/parsing.hpp:437
#21 0x0099f58e in boost::basic_format<char, std::char_traits<char>, std::allocator<char> >::basic_format (
    this=<incomplete type>, s=@0xd700d8) at mingwlibs/include/boost/format/format_implementation.hpp:64
#22 0x008242bd in CGameServer::CheckSync (this=0x9761050) at rts/Game/GameServer.cpp:251
#23 0x00828827 in CGameServer::CreateNewFrame (this=0x9761050, fromServerThread=true, fixedFrameTime=false)
    at rts/Game/GameServer.cpp:984
#24 0x00824b4c in CGameServer::Update (this=0x9761050) at rts/Game/GameServer.cpp:362
#25 0x00828b40 in CGameServer::UpdateLoop (this=0x9761050) at rts/Game/GameServer.cpp:1035
#26 0x00a19297 in boost::_mfi::mf0<void, CGameServer>::operator() (this=0xa9aff5c, p=0x9761050)
    at mingwlibs/include/boost/bind/mem_fn_template.hpp:49
#27 0x009ae726 in boost::_bi::list1<boost::_bi::value<CGameServer*> >::operator()<boost::_mfi::mf0<void, CGameServer>, b
oost::_bi::list0> (this=0xa9aff64, f=@0xa9aff5c, a=@0xa9afdff) at mingwlibs/include/boost/bind.hpp:231
#28 0x009b0272 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, CGameServer>, boost::_bi::list1<boost::_bi::value<CGam
eServer*> > >::operator() (this=0xa9aff5c) at mingwlibs/include/boost/bind/bind_template.hpp:20
#29 0x009bb62f in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, CG
ameServer>, boost::_bi::list1<boost::_bi::value<CGameServer*> > >, void>::invoke (
    function_obj_ptr=@0xa9aff5c) at mingwlibs/include/boost/function/function_template.hpp:155
#30 0x00a1e637 in boost::function0<void, std::allocator<boost::function_base> >::operator() ()
    at rts/System/GlobalStuff.h:123
#31 0x009160e0 in thread_proxy@4 () at rts/System/GlobalStuff.h:123
#32 0x77c3a3b0 in msvcrt!_endthreadex () from /cygdrive/c/WINDOWS/system32/msvcrt.dll
#33 0x0022fac0 in ?? ()
#34 0x7c91b298 in wcsncat () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#35 0x003e0000 in ?? ()
#36 0x096e9c08 in ?? ()
#37 0x00000000 in ?? ()
Note the ridiculous stack corruption.


Third we have a semi-graceful crash that spams error messages if you hit ignore, and leaves no lasting trace. It was... uh... something about boost failing to assert that something !=0.
Edit: ah here it is viewtopic.php?p=263040#p263040


Fourth, poor tombom can't even load up spring to the main menu before it crashes with:

Code: Select all

f:/spring/rts/Map/SM3/terrain/Textures.cpp:107
f:/spring/rts/Lua/LuaCallInHandler.cpp:67
f:/spring/rts/System/SpringApp.cpp:729
f:/spring/rts/System/TdfParser.cpp:28
f:/spring/rts/System/Matrix44f.cpp:99
f:/spring/rts/System/Matrix44f.cpp:114
f:/spring/rts/ExternalAI/AICallback.cpp:1184
??:0
??:0
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: crashing in svn 5572

Post by imbaczek »

The one with the corrupted stack usually happens when an exception is thrown and not caught immediately (at least, that's what was causing it when I ran into it.) It's a gcc-mingw issue.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: crashing in svn 5572

Post by KDR_11k »

I might have fixed it in 5578, at least I fixed something (namely the timeout message) and it stopped crashing for the client as well for me.
Post Reply

Return to “Engine”