• 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 1.X+ TFS 1.2 crash tile

tiagoebone

New Member
Joined
Oct 4, 2022
Messages
4
Reaction score
1
GitHub
tiagoebone
I got some random crashes, can someone help me?


C++:
Thread 2 "tfs" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5fb2640 (LWP 67825)]
0x0000555555b26f5a in Tile::hasProperty (this=0x0, prop=CONST_PROP_BLOCKPROJECTILE) at /home/otserver8001/otserver800/src/tile.cpp:43
43              if (ground && ground->hasProperty(prop)) {
(gdb) bt full
#0  0x0000555555b26f5a in Tile::hasProperty (this=0x0,
    prop=CONST_PROP_BLOCKPROJECTILE)
    at /home/otserver8001/otserver800/src/tile.cpp:43
No locals.
#1  0x00005555558d6e13 in AreaCombat::getList (this=0x7ffff040baa0,
    centerPos=..., targetPos=..., list=empty std::forward_list)
    at /home/otserver8001/otserver800/src/combat.cpp:1076
        tile = 0x0
        area = 0x7ffff5fb16d0
        centerY = 1435389319
        centerX = 21845
        tmpPos = {x = 62971, y = 32767, z = 0 '\000'}
        cols = 4126873472
#2  0x00005555558d39e5 in Combat::getCombatArea (centerPos=..., targetPos=...,
    area=0x7ffff040baa0, list=empty std::forward_list)
    at /home/otserver8001/otserver800/src/combat.cpp:101
No locals.
#3  0x00005555558d52ff in Combat::CombatFunc (caster=0x7ffff05c6880, pos=...,
    area=0x7ffff040baa0, params=...,
    func=0x5555558d4920 <Combat::CombatHealthFunc(Creature*, Creature*, CombatParams const&, CombatDamage*)>, data=0x7ffff5fb18b0)
    at /home/otserver8001/otserver800/src/combat.cpp:671
        tileList = empty std::forward_list
        list = std::unordered_set with 93824995939548 elements = {
          [0] = 0xc19be836d0965a00,
          [1] = 0x5555558d5b6a <Combat::doCombatHealth(Creature*, Position const&, AreaCombat const*, CombatDamage&, CombatParams const&)+70>,
          [2] = 0x5555558d5942 <Combat::doCombat(Creature*, Position const&) const+140>, [3] = 0x555555b1ad47 <CombatSpell::castSpell(Creature*)+371>,
          [4] = 0x555555b1af2a <CombatSpell::castSpell(Creature*, Creature*)+404>, [5] = 0x555555a60249 <Monster::doAttacking(unsigned int)+473>,
          [6] = 0x55555591b403 <Creature::onAttacking(unsigned int)+199>,
          [7] = 0x55555594f36e <Game::checkCreatures(unsigned long)+418>,
          [8] = 0x55555597cafb <std::__invoke_impl<void, void (Game::*&)(unsigned long), Game*&, unsigned long&>(std::__invoke_memfun_deref, void (Game::*&)(unsigned long), Game*&, unsigned long&)+132>,
          [9] = 0x55555597b023 <std::__invoke<void (Game::*&)(unsigned long), Game*&, unsigned long&>(void (Game::*&)(unsigned long), Game*&, unsigned long&)+83>,
          [10] = 0x555555978984 <std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>)+136>,
          [11] = 0x555555974ec9 <std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)>::operator()<, void>()+55>,
          [12] = 0x55555596fed0 <std::__invoke_impl<void, std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)>&>(std::__invoke_other, std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)>&)+36>,
          [13] = 0x555555969940 <std::__invoke_r<void, std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)>&>(std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)>&)+36>,
          [14] = 0x555555962fbf <std::_Function_handler<void (), std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)> >::_M_invoke(std::_Any_data const&)+36>,
          [15] = 0x555555b25a4a <std::function<void ()>::operator()() const+54>, [16] = 0x555555b25994 <Task::operator()()+32>,
          [17] = 0x555555b24ff6 <Dispatcher::threadMain()+250>,
          [18] = 0x555555a9b4eb <std::__invoke_impl<void, void (Dispatcher::*)(), Dispatcher*>(std::__invoke_memfun_deref, void (Dispatcher::*&&)(), Dispatcher*&&)+107>,
          [19] = 0x555555a9b26c <std::__invoke<void (Dispatcher::*)(), Dispatcher*>(void (Dispatcher::*&&)(), Dispatcher*&&)+59>,
          [20] = 0x555555a9ae65 <std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::_M_invoke<0ul, 1ul>(std::_Inde
 
Solved.

The same bug occurred afterwards, and gdb managed to get the tile where the bug was occurring. I believe it was caused by a change in items.otb. Spawns that had part of them "in the air", such as a spawn on top of a small bridge, caused it to be a tile in the game, but at the same time it did not exist, which caused a null tile in the function.
 
Back
Top