Single Blog

OTserver Server Core

25/07/2016, Written by 0 comment

Opa pessoal, hoje vamos ensiná-los algumas dicas sobre o arquivo OTServ Server CORE. Esse arquivo é criado pelo “enable-diagnostic” do game, que é uma opção habilitada na pré-compilação para que programadores possam analisar logs de erro do game após um crash. É assim que os desenvolvedores da comunidade conseguem saber o que aconteceu para um game cair.

Como analisar o GDB (core):

Primeiro entre no seu SSH e digite:

apt-get install gdb

Na pasta do seu game, digite:

gdb theforgottenserver core.pid

Aguarde alguns segundos e digite:

bt

 

Veja um exemplo do log gerado:

#0  Npc::removeShopPlayer (this=0x1, player=0xb4b89ea0) at /usr/include/c++/4.3/bits/stl_list.h:649
649           { return iterator(this->_M_impl._M_node._M_next); }
(gdb) bt
#0  Npc::removeShopPlayer (this=0x1, player=0xb4b89ea0) at /usr/include/c++/4.3/bits/stl_list.h:649
#1  0x080c3321 in Npc::onPlayerEndTrade (this=0x1, player=0xb4b89ea0, buyCallback=-1266598056, sellCallback=-1277184960) at npc.cpp:2107
#2  0x0811c3d4 in Player::closeShopWindow (this=0xb4b89ea0) at player.cpp:1727
#3  0x080b2863 in Npc::closeAllShopWindows (this=0xcad8c48) at npc.cpp:2878
#4  0x080bd283 in Npcs::reload (this=0x8214498) at npc.cpp:57
#5  0x080f64f5 in TalkAction::reloadInfo (player=0xb27fded8, words=@0xb6a5f0f4, param=@0xb6a5f0f0) at talkaction.cpp:369
#6  0x080f6da4 in TalkActions::onPlayerSpeak (this=0x9b58f78, player=0xb27fded8, type=SPEAK_SAY, words=@0x9f0ae24) at talkaction.cpp:183
#7  0x080a5329 in Game::playerSay (this=0x8213e40, playerId=268568707, channelId=0, type=SPEAK_SAY, receiver=@0x9f0ae20, text=@0x9f0ae24) at game.cpp:3485
#8  0x08173455 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<bool, boost::_mfi::mf5<bool, Game, unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&>, boost::_bi::list6<boost::_bi::value<Game*>, boost::_bi::value<unsigned int>, boost::_bi::value<unsigned short>, boost::_bi::value<SpeakClasses>, boost::_bi::value<std::string>, boost::_bi::value<std::string> > >, void>::invoke (function_obj_ptr=@0xc1a5bec)
    at /usr/include/boost/bind/mem_fn_template.hpp:604
#9  0x080fdb41 in boost::function0<void, std::allocator<void> >::operator() (this=0xc1a5be8) at /usr/include/boost/function/function_template.hpp:825
#10 0x080fce3b in Dispatcher::dispatcherThread (p=0x8214000) at tasks.h:43
#11 0xb7c3f22e in thread_proxy () from /usr/lib/libboost_thread-mt.so.1.35.0
#12 0xb78274c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#13 0xb791b6de in clone () from /lib/i686/cmov/libc.so.6
(gdb)

 

Conheça um tutorial completo em Inglês da OTland sobre o assunto.

admin

Leave a reply

Your email address will not be published. Required fields are marked *