• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X [OTX 2] Crash GDB

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,403
Solutions
17
Reaction score
151
Location
Brazil
My server was crashed, i cant identify anything related, anyone can help me please?

C++:
#0  0x000055df0f5a5ca8 in __gnu_cxx::__ops::_Iter_equals_val<Player const* const                                                                                                                                                             >::operator()<__gnu_cxx::__normal_iterator<Player* const*, std::vector<Player*,                                                                                                                                                              std::allocator<Player*> > > > (this=0x7fae4f2bb968,
    __it=non-dereferenceable iterator for std::vector)
    at /usr/include/c++/7/bits/predefined_ops.h:241
#1  0x000055df0f5a5517 in std::__find_if<__gnu_cxx::__normal_iterator<Player* co                                                                                                                                                             nst*, std::vector<Player*, std::allocator<Player*> > >, __gnu_cxx::__ops::_Iter_                                                                                                                                                             equals_val<Player const* const> > (
    __first=non-dereferenceable iterator for std::vector, __last=
    0x55df0f3ef82d <non-virtual thunk to Container::~Container()>, __pred=...)
    at /usr/include/c++/7/bits/stl_algo.h:120
#2  0x000055df0f5a4865 in std::__find_if<__gnu_cxx::__normal_iterator<Player* const*, std::vector<Player*, std::allocator<Player*> > >, __gnu_cxx::__ops::_Iter_equals_val<Player const* const> > (
    __first=non-dereferenceable iterator for std::vector,
    __last=0x55df0f3ef82d <non-virtual thunk to Container::~Container()>,
    __pred=...) at /usr/include/c++/7/bits/stl_algo.h:162
#3  0x000055df0f5a3d82 in std::find<__gnu_cxx::__normal_iterator<Player* const*, std::vector<Player*, std::allocator<Player*> > >, Player const*> (
    __first=non-dereferenceable iterator for std::vector,
    __last=0x55df0f3ef82d <non-virtual thunk to Container::~Container()>,
    __val=@0x7fae4f2bba30: 0x7fae43ae3db0)
    at /usr/include/c++/7/bits/stl_algo.h:3908
---Type <return> to continue, or q <return> to quit---
#4  0x000055df0f5a2fd6 in Party::isPlayerInvited (this=0x7fae433902f0, player=0x7fae43ae3db0, result=false) at party.cpp:430
#5  0x000055df0f5a1511 in Party::removeInvite (this=0x7fae433902f0, player=0x7fae43ae3db0) at party.cpp:170
#6  0x000055df0f5c386e in Player::clearPartyInvitations (this=0x7fae43ae3db0) at player.cpp:5177

#7  0x000055df0f5af914 in Player::onCreatureDisappear (this=0x7fae43ae3db0, creature=0x7fae43ae3db0, isLogout=true) at player.cpp:1547

#8  0x000055df0f43699c in Game::removeCreature (this=0x55df0f98c700 <g_game>, creature=0x7fae43ae3db0, isLogout=true) at game.cpp:1023
#9  0x000055df0f5d1b97 in ProtocolGame::logout (this=0x7fae1007bd50, displayEffect=true, forceLogout=false) at protocolgame.cpp:357
#10 0x000055df0f5f0cf6 in boost::_mfi::mf2<bool, ProtocolGame, bool, bool>::operator() (this=0x7fae1008aed0, p=0x7fae1007bd50, a1=true, a2=false) at /usr/include/boost/bind/mem_fn_template.hpp:280
#11 0x000055df0f5ee847 in boost::_bi::list3<boost::_bi::value<ProtocolGame*>, boost::_bi::value<bool>, boost::_bi::value<bool> >::operator()<bool, boost::_mfi::mf2<bool, ProtocolGame, bool, bool>, boost::_bi::list0> (
    this=0x7fae1008aee0, f=..., a=...) at /usr/include/boost/bind/bind.hpp:388
#12 0x000055df0f5ec1c0 in boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, ProtocolGame, bool, bool>, boost::_bi::list3<boost::_bi::value<ProtocolGame*>, boost::_bi::value<bool>, boost::_bi::value<bool> > >::operator() (
    this=0x7fae1008aed0) at /usr/include/boost/bind/bind.hpp:1294
#13 0x000055df0f5eac22 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, ProtocolGame, bool, bool>, boost::_bi::list3<boost::_bi::value<ProtocolGame*>, boost::_bi::value<bool>, boost::_bi::value<bool> > >, void>::invoke (function_obj_ptr=...) at /usr/include/boost/function/function_template.hpp:159
#14 0x000055df0f42d318 in boost::function0<void>::operator() (this=0x7fae42dce6a0) at /usr/include/boost/function/function_template.hpp:759
#15 0x000055df0f42c98a in Task::operator() (this=0x7fae42dce690) at dispatcher.h:34
#16 0x000055df0f42b645 in Dispatcher::dispatcherThread (this=0x55df0f989320 <Dispatcher::getInstance()::dispatcher>) at dispatcher.cpp:71
#17 0x000055df0f42fe67 in boost::_mfi::mf0<void, Dispatcher>::operator() (this=0x55df10914cd8, p=0x55df0f989320 <Dispatcher::getInstance()::dispatcher>) at /usr/include/boost/bind/mem_fn_template.hpp:49
#18 0x000055df0f42fdca in boost::_bi::list1<boost::_bi::value<Dispatcher*> >::operator()<boost::_mfi::mf0<void, Dispatcher>, boost::_bi::list0> (this=0x55df10914ce8, f=..., a=...) at /usr/include/boost/bind/bind.hpp:259
#19 0x000055df0f42fbe6 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, Dispatcher>, boost::_bi::list1<boost::_bi::value<Dispatcher*> > >::operator() (this=0x55df10914cd8) at /usr/include/boost/bind/bind.hpp:1294
#20 0x000055df0f42f988 in boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, Dispatcher>, boost::_bi::list1<boost::_bi::value<Dispatcher*> > > >::run (this=0x55df10914b20)
    at /usr/include/boost/thread/detail/thread.hpp:116
#21 0x00007fae53c08bcd in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1
#22 0x00007fae539df6db in start_thread (arg=0x7fae4f2bc700) at pthread_create.c:463
#23 0x00007fae5278771f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
 
C++:
bool Game::removeCreature(Creature* creature, bool isLogout /*= true*/)
{
    if(creature->isRemoved())
        return false;

    Tile* tile = creature->getTile();
    SpectatorVec list;
    getSpectators(list, tile->getPosition(), false, true);

    SpectatorVec::iterator it;
    for(it = list.begin(); it != list.end(); ++it)
        (*it)->onCreatureDisappear(creature, isLogout);

    if(tile != creature->getTile())
    {
        list.clear();
        tile = creature->getTile();
        getSpectators(list, tile->getPosition(), false, true);
    }

    Player* player = NULL;
    int32_t oldIndex = tile->__getIndexOfThing(creature);
    if(!map->removeCreature(creature))
        return false;

    //send to client
    uint32_t i = 0;
    for(it = list.begin(); it != list.end(); ++it)
    {
        if(creature != (*it))
            (*it)->updateTileCache(tile);

        if(!(player = (*it)->getPlayer()))
            continue;

        player->sendCreatureDisappear(creature, oldIndex);
        ++i;
    }

    creature->getParent()->postRemoveNotification(NULL, creature, NULL, oldIndex, true);
    creature->onRemovedCreature();

    autoList.erase(creature->getID());
    freeThing(creature);

    removeCreatureCheck(creature);
    for(std::list<Creature*>::iterator it = creature->summons.begin(); it != creature->summons.end(); ++it)
        removeCreature(*it);

    return true;
}

C++:
bool Party::isPlayerInvited(const Player* player, bool result/* = false*/) const
{
    if(!player || player->isRemoved())
        return result;

    return std::find(inviteList.begin(), inviteList.end(), player) != inviteList.end();
}

C++:
void Player::clearPartyInvitations()
{
    if(invitePartyList.empty())
        return;

    PartyList list;
    for(PartyList::iterator it = invitePartyList.begin(); it != invitePartyList.end(); ++it)
        list.push_back(*it);

    invitePartyList.clear();
    for(PartyList::iterator it = list.begin(); it != list.end(); ++it)
        (*it)->removeInvite(this);
}

Can you share the following methods?

Game::removeCreature
Player: onCreatureDisappear
Player::clearPartyInvitations
Party::isPlayerInvited
C++:
void Player::onCreatureDisappear(const Creature* creature, bool isLogout)
{
    Creature::onCreatureDisappear(creature, isLogout);
    if(creature != this)
        return;

    if(isLogout)
        loginPosition = getPosition();

    lastLogout = time(NULL);
    Item* item = NULL;
    for(int32_t slot = SLOT_FIRST; slot < SLOT_LAST; ++slot)
    {
        if(!(item = getInventoryItem((slots_t)slot)))
            continue;

        g_moveEvents->onPlayerDeEquip(this, item, (slots_t)slot, false);
    }

    if(eventWalk)
        setFollowCreature(NULL);

    if(tradePartner)
        g_game.internalCloseTrade(this);

    clearPartyInvitations();
    if(party)
        party->leave(this);

    g_game.cancelRuleViolation(this);
    if(hasFlag(PlayerFlag_CanAnswerRuleViolations))
    {
        PlayerVector closeReportList;
        for(RuleViolationsMap::const_iterator it = g_game.getRuleViolations().begin(); it != g_game.getRuleViolations().end(); ++it)
        {
            if(it->second->gamemaster == this)
                closeReportList.push_back(it->second->reporter);
        }

        for(PlayerVector::iterator it = closeReportList.begin(); it != closeReportList.end(); ++it)
            g_game.closeRuleViolation(*it);
    }

    g_chat.removeUserFromChannels(this);
    if(!isGhost())
        IOLoginData::getInstance()->updateOnlineStatus(guid, false);

    #if defined(WINDOWS) && !defined(_CONSOLE)
    GUI::getInstance()->m_pBox.removePlayer(this);
    #endif

    if(g_config.getBool(ConfigManager::DISPLAY_LOGGING))
        std::clog << getName() << " has logged out." << std::endl;

    bool saved = false;
    for(uint32_t tries = 0; !saved && tries < 3; ++tries)
    {
        if(IOLoginData::getInstance()->savePlayer(this))
            saved = true;
#ifdef __DEBUG__
        else
            std::clog << "Error while saving player: " << getName() << ", strike " << tries << "." << std::endl;
#endif
    }

    if(!saved)
#ifndef __DEBUG__
        std::clog << "Error while saving player: " << getName() << "." << std::endl;
#else
        std::clog << "Player " << getName() << " couldn't be saved." << std::endl;
#endif
}
 
Last edited:
Back
Top