Tibia Server崩溃(gdb崩溃报告)

时间:2016-01-06 21:18:28

标签: crash server

我随机服务器崩溃,但不知道崩溃报告意味着什么:

这是崩溃的报告

#0  0x00007ffff6894e28 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#1  0x00000000005935d6 in Player::getAccountName (this=0x0)
    at ../../src/player.h:277
No locals.
#2  0x000000000063d0b9 in ProtocolGame::XOR_decrypt (this=0x7fffe4ae9d70,
    msg=...) at ../../src/protocolgame.cpp:813
        buffer = 0x7fffe518a366
        messageLength = 26
        account = {static npos = <optimized out>,
          _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
            _M_p = 0x7ffff2cc8a40 "p\213\314\362\377\177"}}
        key = 4641782
#3  0x0000000000638412 in Protocol::onRecvMessage (this=0x7fffe4ae9d70,
    msg=...) at ../../src/protocol.cpp:68
No locals.
#4  0x0000000000464247 in Connection::parsePacket (this=0x7fffe518a340,
    error=...) at ../../src/connection.cpp:421
        __PRETTY_FUNCTION__ = "void Connection::parsePacket(const boost::system::error_code&)

这是导致崩溃的原始功能

void ProtocolGame::XOR_decrypt(NetworkMessage &msg)
{
   uint32_t* buffer = (uint32_t*)msg.getBodyBuffer();
   int32_t messageLength = msg.getMessageLength();
   uint32_t key = player->getAccount() ^ 0x3b7;

   for (int i = 0; i < messageLength; i++){
       buffer[i] = buffer[i] ^ key;
   }
 }

'getAccount()' func返回帐号,例如'4434235' 在崩溃报告中,我看到"getAccountName (this=0x0)"所以我怀疑这个函数是在没有播放器参数的情况下调用的,我是对的吗?

0 个答案:

没有答案