• 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+ gdb error - server crashing

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,424
Solutions
15
Reaction score
176
Location
Sweden
Hey i got this error when the server crashes, but cant understand half, someone willing to explain?

Code:
Thread 2 "tfs" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5f44700 (LWP 26639)]
0x00005555557e9b4e in std::__shared_ptr<OutputMessage, (__gnu_cxx::_Lock_policy)2>::operator bool (this=0x6d) at /usr/include/c++/9/bits/shared_ptr_base.h:1313
1313          { return _M_ptr == 0 ? false : true; }
(gdb) bt full
#0  0x00005555557e9b4e in std::__shared_ptr<OutputMessage, (__gnu_cxx::_Lock_policy)2>::operator bool (this=0x6d) at /usr/include/c++/9/bits/shared_ptr_base.h:1313
No locals.
#1  0x0000555555815e25 in Protocol::getOutputBuffer (this=0x55, size=62) at /home/otsmanager/custom/src/protocol.cpp:53
No locals.
#2  0x00005555558199f6 in ProtocolGame::writeToOutputBuffer (this=0x55, msg=...) at /home/otsmanager/custom/src/protocolgame.cpp:396
        out = std::shared_ptr<OutputMessage> (use count -128611512, weak count -1958166016) = {get() = 0x7ffff5f33940}
#3  0x000055555581fb0c in ProtocolGame::sendTextMessage (this=0x55, message=...) at /home/otsmanager/custom/src/protocolgame.cpp:1415
        msg = {static INITIAL_BUFFER_POSITION = 8, info = {length = 62, position = 70, overrun = false},
          buffer = "\000\000\246\346\\UUU\264\004:\000[RANDOM BOSS]: Boss dissapears in 2 minutes if not killed.\001\000\000\000H\002R\321\377\177\000\000\320\071\363\365\377\177\000\000\r\222ZUUU\000\000@\002R\321\377\177\000\000\360\071\363\365\377\177\000\000\351|ZUUU\000\000\360$A\337\377\377\377\377H\002R\321\377\177\000\000\020:\363\365\377\177\000\000ȑYUUU\000\000\350$A\337\377\377\377\377H\002R\321\377\177\000\000\060:\363\365\377\177\000\000\023\251YUUU\000\000\350$A\337\377\177\000\000@\002R\321\377\177\000\000"...}
#4  0x00005555555bf24a in Player::sendTextMessage (this=0x7fffdf605a60, message=...) at /home/otsmanager/custom/src/player.h:974
No locals.
#5  0x0000555555756c1b in LuaScriptInterface::luaPlayerSendTextMessage (L=0x40040378) at /home/otsmanager/custom/src/luascript.cpp:9278
        player = 0x7fffdf605a60
        parameters = 3
        message = {type = MESSAGE_STATUS_CONSOLE_BLUE, text = "[RANDOM BOSS]: Boss dissapears in 2 minutes if not killed.", position = {x = 0, y = 0, z = 0 '\000'}, channelId = 0, primary = {value = 0, color = 0}, secondary = {
            value = 0, color = -1}}
#6  0x00007ffff792bfb7 in ?? () from /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2
No symbol table info available.
#7  0x00007ffff797a4a4 in lua_pcall () from /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2
No symbol table info available.
#8  0x00005555556d57f0 in LuaScriptInterface::protectedCall (L=0x40040378, nargs=1, nresults=1) at /home/otsmanager/custom/src/luascript.cpp:300
        error_index = 4
        ret = 21845
#9  0x00005555556d6958 in LuaScriptInterface::callFunction (this=0x555555a3a500 <g_luaEnvironment>, params=1) at /home/otsmanager/custom/src/luascript.cpp:547
        result = false
        size = 5
#10 0x000055555576f7ce in LuaEnvironment::executeTimerEvent (this=0x555555a3a500 <g_luaEnvironment>, eventIndex=3449301) at /home/otsmanager/custom/src/luascript.cpp:16406
        env = 0x555555a3a6e0 <LuaScriptInterface::scriptEnv>
        it = {<std::__detail::_Node_iterator_base<std::pair<unsigned int const, LuaTimerEventDesc>, false>> = {_M_cur = 0x555555ef9040}, <No data fields>}
        timerEventDesc = {scriptId = 1242, function = 3375, parameters = std::vector of length 1, capacity 1 = {421}, eventId = 13571662}
#11 0x000055555578ded8 in std::__invoke_impl<void, void (LuaEnvironment::*&)(unsigned int), LuaEnvironment*&, unsigned int&> (__f=
    @0x7fffd0403470: (void (LuaEnvironment::*)(LuaEnvironment * const, unsigned int)) 0x55555576f5fa <LuaEnvironment::executeTimerEvent(unsigned int)>, __t=@0x7fffd0403488: 0x555555a3a500 <g_luaEnvironment>)
    at /usr/include/c++/9/bits/invoke.h:73
No locals.
#12 0x000055555578ac72 in std::__invoke<void (LuaEnvironment::*&)(unsigned int), LuaEnvironment*&, unsigned int&> (__fn=
    @0x7fffd0403470: (void (LuaEnvironment::*)(LuaEnvironment * const, unsigned int)) 0x55555576f5fa <LuaEnvironment::executeTimerEvent(unsigned int)>) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#13 0x0000555555786290 in std::_Bind<void (LuaEnvironment::*(LuaEnvironment*, unsigned int))(unsigned int)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>) (this=0x7fffd0403470, __args=...)
    at /usr/include/c++/9/functional:400
No locals.
#14 0x000055555577fdd5 in std::_Bind<void (LuaEnvironment::*(LuaEnvironment*, unsigned int))(unsigned int)>::operator()<, void>() (this=0x7fffd0403470) at /usr/include/c++/9/functional:484
No locals.
#15 0x0000555555779140 in std::_Function_handler<void (), std::_Bind<void (LuaEnvironment::*(LuaEnvironment*, unsigned int))(unsigned int)> >::_M_invoke(std::_Any_data const&) (__functor=...)
    at /usr/include/c++/9/bits/std_function.h:300
No locals.
#16 0x000055555589191a in std::function<void ()>::operator()() const (this=0x555555c35310) at /usr/include/c++/9/bits/std_function.h:688
No locals.
#17 0x0000555555891444 in Task::operator() (this=0x555555c35300) at /home/otsmanager/custom/src/tasks.h:40
No locals.
#18 0x0000555555891679 in Dispatcher::threadMain (this=0x555555a3b080 <g_dispatcher>) at /home/otsmanager/custom/src/tasks.cpp:60
        task = 0x555555c35300
        taskLockUnique = {_M_device = 0x555555a3b098 <g_dispatcher+24>, _M_owns = false}
#19 0x00005555557e52d4 in std::__invoke_impl<void, void (Dispatcher::*)(), Dispatcher*> (__f=@0x555555a6cae0: (void (Dispatcher::*)(Dispatcher * const)) 0x55555589156a <Dispatcher::threadMain()>,
    __t=@0x555555a6cad8: 0x555555a3b080 <g_dispatcher>) at /usr/include/c++/9/bits/invoke.h:73
No locals.
#20 0x00005555557e5003 in std::__invoke<void (Dispatcher::*)(), Dispatcher*> (__fn=@0x555555a6cae0: (void (Dispatcher::*)(Dispatcher * const)) 0x55555589156a <Dispatcher::threadMain()>) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#21 0x00005555557e4b6f in std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::_M_invoke<0ul, 1ul> (this=0x555555a6cad8) at /usr/include/c++/9/thread:244
No locals.
#22 0x00005555557e4573 in std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::operator() (this=0x555555a6cad8) at /usr/include/c++/9/thread:251
--Type <RET> for more, q to quit, c to continue without paging--
 
Hey i got this error when the server crashes, but cant understand half, someone willing to explain?

Code:
Thread 2 "tfs" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5f44700 (LWP 26639)]
0x00005555557e9b4e in std::__shared_ptr<OutputMessage, (__gnu_cxx::_Lock_policy)2>::operator bool (this=0x6d) at /usr/include/c++/9/bits/shared_ptr_base.h:1313
1313          { return _M_ptr == 0 ? false : true; }
(gdb) bt full
#0  0x00005555557e9b4e in std::__shared_ptr<OutputMessage, (__gnu_cxx::_Lock_policy)2>::operator bool (this=0x6d) at /usr/include/c++/9/bits/shared_ptr_base.h:1313
No locals.
#1  0x0000555555815e25 in Protocol::getOutputBuffer (this=0x55, size=62) at /home/otsmanager/custom/src/protocol.cpp:53
No locals.
#2  0x00005555558199f6 in ProtocolGame::writeToOutputBuffer (this=0x55, msg=...) at /home/otsmanager/custom/src/protocolgame.cpp:396
        out = std::shared_ptr<OutputMessage> (use count -128611512, weak count -1958166016) = {get() = 0x7ffff5f33940}
#3  0x000055555581fb0c in ProtocolGame::sendTextMessage (this=0x55, message=...) at /home/otsmanager/custom/src/protocolgame.cpp:1415
        msg = {static INITIAL_BUFFER_POSITION = 8, info = {length = 62, position = 70, overrun = false},
          buffer = "\000\000\246\346\\UUU\264\004:\000[RANDOM BOSS]: Boss dissapears in 2 minutes if not killed.\001\000\000\000H\002R\321\377\177\000\000\320\071\363\365\377\177\000\000\r\222ZUUU\000\000@\002R\321\377\177\000\000\360\071\363\365\377\177\000\000\351|ZUUU\000\000\360$A\337\377\377\377\377H\002R\321\377\177\000\000\020:\363\365\377\177\000\000ȑYUUU\000\000\350$A\337\377\377\377\377H\002R\321\377\177\000\000\060:\363\365\377\177\000\000\023\251YUUU\000\000\350$A\337\377\177\000\000@\002R\321\377\177\000\000"...}
#4  0x00005555555bf24a in Player::sendTextMessage (this=0x7fffdf605a60, message=...) at /home/otsmanager/custom/src/player.h:974
No locals.
#5  0x0000555555756c1b in LuaScriptInterface::luaPlayerSendTextMessage (L=0x40040378) at /home/otsmanager/custom/src/luascript.cpp:9278
        player = 0x7fffdf605a60
        parameters = 3
        message = {type = MESSAGE_STATUS_CONSOLE_BLUE, text = "[RANDOM BOSS]: Boss dissapears in 2 minutes if not killed.", position = {x = 0, y = 0, z = 0 '\000'}, channelId = 0, primary = {value = 0, color = 0}, secondary = {
            value = 0, color = -1}}
#6  0x00007ffff792bfb7 in ?? () from /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2
No symbol table info available.
#7  0x00007ffff797a4a4 in lua_pcall () from /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2
No symbol table info available.
#8  0x00005555556d57f0 in LuaScriptInterface::protectedCall (L=0x40040378, nargs=1, nresults=1) at /home/otsmanager/custom/src/luascript.cpp:300
        error_index = 4
        ret = 21845
#9  0x00005555556d6958 in LuaScriptInterface::callFunction (this=0x555555a3a500 <g_luaEnvironment>, params=1) at /home/otsmanager/custom/src/luascript.cpp:547
        result = false
        size = 5
#10 0x000055555576f7ce in LuaEnvironment::executeTimerEvent (this=0x555555a3a500 <g_luaEnvironment>, eventIndex=3449301) at /home/otsmanager/custom/src/luascript.cpp:16406
        env = 0x555555a3a6e0 <LuaScriptInterface::scriptEnv>
        it = {<std::__detail::_Node_iterator_base<std::pair<unsigned int const, LuaTimerEventDesc>, false>> = {_M_cur = 0x555555ef9040}, <No data fields>}
        timerEventDesc = {scriptId = 1242, function = 3375, parameters = std::vector of length 1, capacity 1 = {421}, eventId = 13571662}
#11 0x000055555578ded8 in std::__invoke_impl<void, void (LuaEnvironment::*&)(unsigned int), LuaEnvironment*&, unsigned int&> (__f=
    @0x7fffd0403470: (void (LuaEnvironment::*)(LuaEnvironment * const, unsigned int)) 0x55555576f5fa <LuaEnvironment::executeTimerEvent(unsigned int)>, __t=@0x7fffd0403488: 0x555555a3a500 <g_luaEnvironment>)
    at /usr/include/c++/9/bits/invoke.h:73
No locals.
#12 0x000055555578ac72 in std::__invoke<void (LuaEnvironment::*&)(unsigned int), LuaEnvironment*&, unsigned int&> (__fn=
    @0x7fffd0403470: (void (LuaEnvironment::*)(LuaEnvironment * const, unsigned int)) 0x55555576f5fa <LuaEnvironment::executeTimerEvent(unsigned int)>) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#13 0x0000555555786290 in std::_Bind<void (LuaEnvironment::*(LuaEnvironment*, unsigned int))(unsigned int)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>) (this=0x7fffd0403470, __args=...)
    at /usr/include/c++/9/functional:400
No locals.
#14 0x000055555577fdd5 in std::_Bind<void (LuaEnvironment::*(LuaEnvironment*, unsigned int))(unsigned int)>::operator()<, void>() (this=0x7fffd0403470) at /usr/include/c++/9/functional:484
No locals.
#15 0x0000555555779140 in std::_Function_handler<void (), std::_Bind<void (LuaEnvironment::*(LuaEnvironment*, unsigned int))(unsigned int)> >::_M_invoke(std::_Any_data const&) (__functor=...)
    at /usr/include/c++/9/bits/std_function.h:300
No locals.
#16 0x000055555589191a in std::function<void ()>::operator()() const (this=0x555555c35310) at /usr/include/c++/9/bits/std_function.h:688
No locals.
#17 0x0000555555891444 in Task::operator() (this=0x555555c35300) at /home/otsmanager/custom/src/tasks.h:40
No locals.
#18 0x0000555555891679 in Dispatcher::threadMain (this=0x555555a3b080 <g_dispatcher>) at /home/otsmanager/custom/src/tasks.cpp:60
        task = 0x555555c35300
        taskLockUnique = {_M_device = 0x555555a3b098 <g_dispatcher+24>, _M_owns = false}
#19 0x00005555557e52d4 in std::__invoke_impl<void, void (Dispatcher::*)(), Dispatcher*> (__f=@0x555555a6cae0: (void (Dispatcher::*)(Dispatcher * const)) 0x55555589156a <Dispatcher::threadMain()>,
    __t=@0x555555a6cad8: 0x555555a3b080 <g_dispatcher>) at /usr/include/c++/9/bits/invoke.h:73
No locals.
#20 0x00005555557e5003 in std::__invoke<void (Dispatcher::*)(), Dispatcher*> (__fn=@0x555555a6cae0: (void (Dispatcher::*)(Dispatcher * const)) 0x55555589156a <Dispatcher::threadMain()>) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#21 0x00005555557e4b6f in std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::_M_invoke<0ul, 1ul> (this=0x555555a6cad8) at /usr/include/c++/9/thread:244
No locals.
#22 0x00005555557e4573 in std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::operator() (this=0x555555a6cad8) at /usr/include/c++/9/thread:251
--Type <RET> for more, q to quit, c to continue without paging--

Im guessing you've called player:sendTextMessage somewhere with invalid parameters.
Code:
player = 0x7fffdf605a60
parameters = 3
message = {
    type = MESSAGE_STATUS_CONSOLE_BLUE,
    text = "[RANDOM BOSS]: Boss dissapears in 2 minutes if not killed.",
    position = {x = 0, y = 0, z = 0 '\000'},
    channelId = 0,
    primary = {value = 0, color = 0},
    secondary = {
            value = 0, color = -1
    }
}
Could you show the script where this is used?
 
Im guessing you've called player:sendTextMessage somewhere with invalid parameters.
Code:
player = 0x7fffdf605a60
parameters = 3
message = {
    type = MESSAGE_STATUS_CONSOLE_BLUE,
    text = "[RANDOM BOSS]: Boss dissapears in 2 minutes if not killed.",
    position = {x = 0, y = 0, z = 0 '\000'},
    channelId = 0,
    primary = {value = 0, color = 0},
    secondary = {
            value = 0, color = -1
    }
}
Could you show the script where this is used?
The thing is, i removed this script from globalevents.xml cause it has several errors and needs to be reworked but server still crashes with this as message.

Edit: Am i maybe getting an old gdb core fault?
 
Yup, its an old one:
-rw------- 1 otsmanager otsmanager 108322816 Apr 9 17:19 core

Sooo how to refresh that even?
try
Bash:
# remove old core file
rm ./core

# start tfs & let it crash
ulimit -c unlimited && ./tfs

# view files
ls -alt

# if there is a core file, execute :
gdb tfs core
 
Im guessing you've called player:sendTextMessage somewhere with invalid parameters.
Code:
player = 0x7fffdf605a60
parameters = 3
message = {
    type = MESSAGE_STATUS_CONSOLE_BLUE,
    text = "[RANDOM BOSS]: Boss dissapears in 2 minutes if not killed.",
    position = {x = 0, y = 0, z = 0 '\000'},
    channelId = 0,
    primary = {value = 0, color = 0},
    secondary = {
            value = 0, color = -1
    }
}
Could you show the script where this is used?
you are the best

i want to be like you =D
 
try
Bash:
# remove old core file
rm ./core

# start tfs & let it crash
ulimit -c unlimited && ./tfs

# view files
ls -alt

# if there is a core file, execute :
gdb tfs core
Worked like a charm, now a got a new bug, this one i cant actually tell whats going on really. If you'd like to help out again. =)

Code:
Thread 2 "tfs" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5f44700 (LWP 19765)]
0x0000000000000000 in ?? ()
(gdb) bt full
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#1  0x00005555556a41cf in Item::canDecay (this=0x7fffd4de3560) at /home/otsmanager/custom/src/item.cpp:1578
        it = @0x7ffff5f43ba8: {group = 1439257728, type = 21845, id = 3, clientId = 0, stackable = false, isAnimation = false, name = "",
          article = <error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.>, pluralName = "", description = "",
          runeSpellName = "\311\303UH\211\345H\203\354\bH\211}\370H\213E\370H\211\307\350\372\304\376\377\311\303UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307\350\265L\377\377\311\303UH\211\345H\211}\370H\213E\370]\303UH\211\345H\211}\370H\213E\370]\303UH\211\345ATSH\203\354 H\211}\350H\211u\340H\211U\330H\213E\340H\211\307\350\220U\364\377H\213\000H\213U\350H\213R\bL\215$\020H\213U\350H\213\022\203\342\001H\205\322t!H\213U\350H\213R\bH\001\320H\213\020H\213E\350H\213\000H\203\350\001H\001\320H\213\030\353\aH\213E\350H\213\030H\213E\330H\211\307\350o\377\377\377\213"...,
          vocationString = "H\213E\350dH3\004%(\000\000\000t\005\350\063+\363\377H\203\304([]\303UH\211\345SH\203\354\020H\211}\360H\211u\350H\213]\360H\213E\350H\211\307\350\255$\376\377H\211\306H\211\337茔\377\377H\203\304\020[]\303UH\211\345H\211}\370H\213E\370]\303UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307\350^G\000\000\311\303UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307\350^G\000\000\311ÐUH\211\345H\203\354 H\211}\370H\211u\360H\211U\350H\213E\360H\211\307\350UG\000\000\311\303UH\211\345ATSH\203\354\060H\211}\330H\211u\320H\211"..., abilities = std::unique_ptr<Abilities> = {get() = 0x83141ff209799c00}, conditionDamage = std::unique_ptr<ConditionDamage> = {
            get() = 0x555555c18850}, weight = 1436994264, levelDoor = 21845, decayTime = 4126424256, wieldInfo = 32767, minReqLevel = 1432689163, minReqMagicLevel = 21845, charges = 4126424295, maxHitChance = 32767,
          decayTo = 1438746688, attack = 21845, defense = 1440254832, extraDefense = 21845, armor = 158964736, rotateTo = 8178, runeMagLevel = -168542992, runeLevel = 32767, worth = 93824993235353, combatType = 15600,
          transformToOnUse = {62964, 32767}, transformToFree = 0, destroyTo = 34880, maxTextLen = 21953, writeOnceItemId = 21845, transformEquipTo = 0, transformDeEquipTo = 15648, maxItems = 62964, slotPosition = 32767, speed = 0,
          wareId = 39936, magicEffect = 121, bedPartnerDir = 9, weaponType = -14, ammoType = 31, shootType = CONST_ANI_GREENSTAR, corpseType = -125, fluidSource = 16, floorChange = 61 '=', alwaysOnTopOrder = 244 '\364',
          lightLevel = 245 '\365', lightColor = 255 '\377', shootRange = 127 '\177', hitChance = 0 '\000', forceUse = false, forceSerialize = 225, hasHeight = 27, walkStack = 100, blockSolid = 85, blockPickupable = 85,
          blockProjectile = 85, blockPathFind = false, allowPickupable = false, showDuration = false, showCharges = 163, showAttributes = 176, replaceable = 170, pickupable = 255, rotatable = 127, useable = false, moveable = false,
          alwaysOnTop = 112, canReadText = 139, canWriteText = 216, isVertical = 85, isHorizontal = 85, isHangable = 85, allowDistRead = false, lookThrough = false, stopTime = 48, showCount = 61}
#2  0x00005555556340d9 in Game::checkDecay (this=0x555555a3b240 <g_game>) at /home/otsmanager/custom/src/game.cpp:4523
        item = 0x7fffd4de3560
        duration = 156000
        decreaseTime = 1000
        bucket = 3
        it = 0x7fffd4de3560
        end = 0x496
#3  0x000055555565cda9 in std::__invoke_impl<void, void (Game::*&)(), Game*&> (__f=@0x555555c18840: (void (Game::*)(Game * const)) 0x555555633f72 <Game::checkDecay()>, __t=@0x555555c18850: 0x555555a3b240 <g_game>)
    at /usr/include/c++/9/bits/invoke.h:73
No locals.
#4  0x00005555556585d9 in std::__invoke<void (Game::*&)(), Game*&> (__fn=@0x555555c18840: (void (Game::*)(Game * const)) 0x555555633f72 <Game::checkDecay()>) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#5  0x0000555555651a0b in std::_Bind<void (Game::*(Game*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (this=0x555555c18840, __args=...) at /usr/include/c++/9/functional:400
No locals.
#6  0x0000555555649199 in std::_Bind<void (Game::*(Game*))()>::operator()<, void>() (this=0x555555c18840) at /usr/include/c++/9/functional:484
No locals.
#7  0x0000555555641be1 in std::_Function_handler<void (), std::_Bind<void (Game::*(Game*))()> >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/9/bits/std_function.h:300
No locals.
#8  0x000055555589191a in std::function<void ()>::operator()() const (this=0x555555d88b70) at /usr/include/c++/9/bits/std_function.h:688
No locals.
#9  0x0000555555891444 in Task::operator() (this=0x555555d88b60) at /home/otsmanager/custom/src/tasks.h:40
No locals.
#10 0x0000555555891679 in Dispatcher::threadMain (this=0x555555a3b080 <g_dispatcher>) at /home/otsmanager/custom/src/tasks.cpp:60
        task = 0x555555d88b60
        taskLockUnique = {_M_device = 0x555555a3b098 <g_dispatcher+24>, _M_owns = false}
#11 0x00005555557e52d4 in std::__invoke_impl<void, void (Dispatcher::*)(), Dispatcher*> (__f=@0x555555a6cae0: (void (Dispatcher::*)(Dispatcher * const)) 0x55555589156a <Dispatcher::threadMain()>,
    __t=@0x555555a6cad8: 0x555555a3b080 <g_dispatcher>) at /usr/include/c++/9/bits/invoke.h:73
No locals.
#12 0x00005555557e5003 in std::__invoke<void (Dispatcher::*)(), Dispatcher*> (__fn=@0x555555a6cae0: (void (Dispatcher::*)(Dispatcher * const)) 0x55555589156a <Dispatcher::threadMain()>) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#13 0x00005555557e4b6f in std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::_M_invoke<0ul, 1ul> (this=0x555555a6cad8) at /usr/include/c++/9/thread:244
No locals.
#14 0x00005555557e4573 in std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::operator() (this=0x555555a6cad8) at /usr/include/c++/9/thread:251
No locals.
#15 0x00005555557e3de0 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> > >::_M_run (this=0x555555a6cad0) at /usr/include/c++/9/thread:195
No locals.
#16 0x00007ffff70e0d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#17 0x00007ffff7d6d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737319814912, -8087730151613465205, 140737488347518, 140737488347519, 140737488347520, 140737319812992, 8087752101014076811, 8087747957685681547}, mask_was_saved = 0}}, priv = {
            pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
--Type <RET> for more, q to quit, c to continue without paging--
 
Worked like a charm, now a got a new bug, this one i cant actually tell whats going on really. If you'd like to help out again. =)

Code:
Thread 2 "tfs" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5f44700 (LWP 19765)]
0x0000000000000000 in ?? ()
(gdb) bt full
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#1  0x00005555556a41cf in Item::canDecay (this=0x7fffd4de3560) at /home/otsmanager/custom/src/item.cpp:1578
        it = @0x7ffff5f43ba8: {group = 1439257728, type = 21845, id = 3, clientId = 0, stackable = false, isAnimation = false, name = "",
          article = <error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.>, pluralName = "", description = "",
          runeSpellName = "\311\303UH\211\345H\203\354\bH\211}\370H\213E\370H\211\307\350\372\304\376\377\311\303UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307\350\265L\377\377\311\303UH\211\345H\211}\370H\213E\370]\303UH\211\345H\211}\370H\213E\370]\303UH\211\345ATSH\203\354 H\211}\350H\211u\340H\211U\330H\213E\340H\211\307\350\220U\364\377H\213\000H\213U\350H\213R\bL\215$\020H\213U\350H\213\022\203\342\001H\205\322t!H\213U\350H\213R\bH\001\320H\213\020H\213E\350H\213\000H\203\350\001H\001\320H\213\030\353\aH\213E\350H\213\030H\213E\330H\211\307\350o\377\377\377\213"...,
          vocationString = "H\213E\350dH3\004%(\000\000\000t\005\350\063+\363\377H\203\304([]\303UH\211\345SH\203\354\020H\211}\360H\211u\350H\213]\360H\213E\350H\211\307\350\255$\376\377H\211\306H\211\337茔\377\377H\203\304\020[]\303UH\211\345H\211}\370H\213E\370]\303UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307\350^G\000\000\311\303UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307\350^G\000\000\311ÐUH\211\345H\203\354 H\211}\370H\211u\360H\211U\350H\213E\360H\211\307\350UG\000\000\311\303UH\211\345ATSH\203\354\060H\211}\330H\211u\320H\211"..., abilities = std::unique_ptr<Abilities> = {get() = 0x83141ff209799c00}, conditionDamage = std::unique_ptr<ConditionDamage> = {
            get() = 0x555555c18850}, weight = 1436994264, levelDoor = 21845, decayTime = 4126424256, wieldInfo = 32767, minReqLevel = 1432689163, minReqMagicLevel = 21845, charges = 4126424295, maxHitChance = 32767,
          decayTo = 1438746688, attack = 21845, defense = 1440254832, extraDefense = 21845, armor = 158964736, rotateTo = 8178, runeMagLevel = -168542992, runeLevel = 32767, worth = 93824993235353, combatType = 15600,
          transformToOnUse = {62964, 32767}, transformToFree = 0, destroyTo = 34880, maxTextLen = 21953, writeOnceItemId = 21845, transformEquipTo = 0, transformDeEquipTo = 15648, maxItems = 62964, slotPosition = 32767, speed = 0,
          wareId = 39936, magicEffect = 121, bedPartnerDir = 9, weaponType = -14, ammoType = 31, shootType = CONST_ANI_GREENSTAR, corpseType = -125, fluidSource = 16, floorChange = 61 '=', alwaysOnTopOrder = 244 '\364',
          lightLevel = 245 '\365', lightColor = 255 '\377', shootRange = 127 '\177', hitChance = 0 '\000', forceUse = false, forceSerialize = 225, hasHeight = 27, walkStack = 100, blockSolid = 85, blockPickupable = 85,
          blockProjectile = 85, blockPathFind = false, allowPickupable = false, showDuration = false, showCharges = 163, showAttributes = 176, replaceable = 170, pickupable = 255, rotatable = 127, useable = false, moveable = false,
          alwaysOnTop = 112, canReadText = 139, canWriteText = 216, isVertical = 85, isHorizontal = 85, isHangable = 85, allowDistRead = false, lookThrough = false, stopTime = 48, showCount = 61}
#2  0x00005555556340d9 in Game::checkDecay (this=0x555555a3b240 <g_game>) at /home/otsmanager/custom/src/game.cpp:4523
        item = 0x7fffd4de3560
        duration = 156000
        decreaseTime = 1000
        bucket = 3
        it = 0x7fffd4de3560
        end = 0x496
#3  0x000055555565cda9 in std::__invoke_impl<void, void (Game::*&)(), Game*&> (__f=@0x555555c18840: (void (Game::*)(Game * const)) 0x555555633f72 <Game::checkDecay()>, __t=@0x555555c18850: 0x555555a3b240 <g_game>)
    at /usr/include/c++/9/bits/invoke.h:73
No locals.
#4  0x00005555556585d9 in std::__invoke<void (Game::*&)(), Game*&> (__fn=@0x555555c18840: (void (Game::*)(Game * const)) 0x555555633f72 <Game::checkDecay()>) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#5  0x0000555555651a0b in std::_Bind<void (Game::*(Game*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (this=0x555555c18840, __args=...) at /usr/include/c++/9/functional:400
No locals.
#6  0x0000555555649199 in std::_Bind<void (Game::*(Game*))()>::operator()<, void>() (this=0x555555c18840) at /usr/include/c++/9/functional:484
No locals.
#7  0x0000555555641be1 in std::_Function_handler<void (), std::_Bind<void (Game::*(Game*))()> >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/9/bits/std_function.h:300
No locals.
#8  0x000055555589191a in std::function<void ()>::operator()() const (this=0x555555d88b70) at /usr/include/c++/9/bits/std_function.h:688
No locals.
#9  0x0000555555891444 in Task::operator() (this=0x555555d88b60) at /home/otsmanager/custom/src/tasks.h:40
No locals.
#10 0x0000555555891679 in Dispatcher::threadMain (this=0x555555a3b080 <g_dispatcher>) at /home/otsmanager/custom/src/tasks.cpp:60
        task = 0x555555d88b60
        taskLockUnique = {_M_device = 0x555555a3b098 <g_dispatcher+24>, _M_owns = false}
#11 0x00005555557e52d4 in std::__invoke_impl<void, void (Dispatcher::*)(), Dispatcher*> (__f=@0x555555a6cae0: (void (Dispatcher::*)(Dispatcher * const)) 0x55555589156a <Dispatcher::threadMain()>,
    __t=@0x555555a6cad8: 0x555555a3b080 <g_dispatcher>) at /usr/include/c++/9/bits/invoke.h:73
No locals.
#12 0x00005555557e5003 in std::__invoke<void (Dispatcher::*)(), Dispatcher*> (__fn=@0x555555a6cae0: (void (Dispatcher::*)(Dispatcher * const)) 0x55555589156a <Dispatcher::threadMain()>) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#13 0x00005555557e4b6f in std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::_M_invoke<0ul, 1ul> (this=0x555555a6cad8) at /usr/include/c++/9/thread:244
No locals.
#14 0x00005555557e4573 in std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> >::operator() (this=0x555555a6cad8) at /usr/include/c++/9/thread:251
No locals.
#15 0x00005555557e3de0 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (Dispatcher::*)(), Dispatcher*> > >::_M_run (this=0x555555a6cad0) at /usr/include/c++/9/thread:195
No locals.
#16 0x00007ffff70e0d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#17 0x00007ffff7d6d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737319814912, -8087730151613465205, 140737488347518, 140737488347519, 140737488347520, 140737319812992, 8087752101014076811, 8087747957685681547}, mask_was_saved = 0}}, priv = {
            pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
--Type <RET> for more, q to quit, c to continue without paging--
Anyone able to explain this fault? Something with item decaying or such? I can't for any reason understand whats going on.

Edit: and this one..


Code:
Thread 2 "tfs" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5f44700 (LWP 24549)]
0x00005555555fb436 in std::_Rb_tree<unsigned int, std::pair<unsigned int const, Creature::CountBlock_t>, std::_Select1st<std::pair<unsigned int const, Creature::CountBlock_t> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, Creature::CountBlock_t> > >::_S_right (__x=0x4b4000000000000) at /usr/include/c++/9/bits/stl_tree.h:798
798           { return static_cast<_Link_type>(__x->_M_right); }
(gdb) bt full
#0  0x00005555555fb436 in std::_Rb_tree<unsigned int, std::pair<unsigned int const, Creature::CountBlock_t>, std::_Select1st<std::pair<unsigned int const, Creature::CountBlock_t> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, Creature::CountBlock_t> > >::_S_right (__x=0x4b4000000000000) at /usr/include/c++/9/bits/stl_tree.h:798
No locals.
#1  0x00005555555f9359 in std::_Rb_tree<unsigned int, std::pair<unsigned int const, Creature::CountBlock_t>, std::_Select1st<std::pair<unsigned int const, Creature::CountBlock_t> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, Creature::CountBlock_t> > >::_M_erase (this=0x7fffd84bd290, __x=0x4b4000000000000) at /usr/include/c++/9/bits/stl_tree.h:1913
        __y = 0x7fffd1e5a110
#2  0x00005555555f936b in std::_Rb_tree<unsigned int, std::pair<unsigned int const, Creature::CountBlock_t>, std::_Select1st<std::pair<unsigned int const, Creature::CountBlock_t> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, Creature::CountBlock_t> > >::_M_erase (this=0x7fffd84bd290, __x=0x7fffd1e5a110) at /usr/include/c++/9/bits/stl_tree.h:1913
        __y = 0x7fffd84bd290
#3  0x00005555555f970a in std::_Rb_tree<unsigned int, std::pair<unsigned int const, Creature::CountBlock_t>, std::_Select1st<std::pair<unsigned int const, Creature::CountBlock_t> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, Creature::CountBlock_t> > >::clear (this=0x7fffd84bd290) at /usr/include/c++/9/bits/stl_tree.h:1266
No locals.
#4  0x00005555555f7d32 in std::map<unsigned int, Creature::CountBlock_t, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, Creature::CountBlock_t> > >::clear (this=0x7fffd84bd290)
    at /usr/include/c++/9/bits/stl_map.h:1133
No locals.
#5  0x00005555555f1557 in Creature::onIdleStatus (this=0x7fffd84bd280) at /home/otsmanager/custom/src/creature.cpp:190
No locals.
#6  0x00005555557a15de in Monster::setIdle (this=0x7fffd84bd280, idle=true) at /home/otsmanager/custom/src/monster.cpp:668
No locals.
#7  0x00005555557a16f1 in Monster::updateIdleStatus (this=0x7fffd84bd280) at /home/otsmanager/custom/src/monster.cpp:685
        idle = true
#8  0x000055555579f8ae in Monster::onCreatureMove (this=0x7fffd84bd280, creature=0x7fffdf90d0f0, newTile=0x7fffcf1ff820, newPos=..., oldTile=0x7fffcf1ff4d0, oldPos=..., teleport=false) at /home/otsmanager/custom/src/monster.cpp:258
        canSeeNewPos = true
        canSeeOldPos = true
#9  0x0000555555794ea8 in Map::moveCreature (this=0x555555a3b290 <g_game+80>, creature=..., newTile=..., forceTeleport=false) at /home/otsmanager/custom/src/map.cpp:297
        spectator = 0x7fffd84bd280
        __for_range = @0x7ffff5f43a30: {vec = std::vector of length 48, capacity 64 = {0x7fffd3e6a280, 0x7fffdf9c9490, 0x7ffff1500860, 0x7fffd15b0c10, 0x7fffd5db9a80, 0x7fffd5db9f40, 0x7ffff2eced30, 0x7fffe10ba560, 0x7fffda8c65f0,
            0x7fffd286e0f0, 0x7ffff375f140, 0x7fffd3bb2910, 0x7fffd84bd280, 0x7fffd1667b60, 0x7ffff2653dc0, 0x7fffe2bc5d30, 0x7fffd4da1c80, 0x7fffd42ff8a0, 0x7fffda47f810, 0x7ffff1fc6370, 0x7fffd273fc70, 0x7fffd5a4a8d0, 0x7fffd52c96c0,
            0x7fffe0d6cf20, 0x7ffff2e0a830, 0x7fffdf57a9a0, 0x7fffd52cb6b0, 0x7ffff1fa5750, 0x7fffdf90d0f0, 0x7ffff33b4d30, 0x7ffff33b51f0, 0x7fffda42bb10, 0x7fffd2131920, 0x7ffff1fb9cf0, 0x7fffe330dab0, 0x7fffd5ab96b0, 0x7fffd5ab9ba0,
            0x7fffd953e5d0, 0x7ffff2ea14b0, 0x7fffd3348490, 0x7fffda1ad180, 0x7fffd45e83d0, 0x7fffd84bb3e0, 0x7fffd8a25570, 0x7fffd5ada510, 0x7fffd5da0940, 0x7ffff2ea1f50, 0x7fffe0de6ca0}}
        __for_begin = 0x7fffd84bd280
        __for_end = 0x7fffdff07840
        oldTile = @0x7fffcf1ff4d0: {<Cylinder> = {<Thing> = {_vptr.Thing = 0x555555a2b860 <vtable for DynamicTile+160>}, <No data fields>}, static nullptr_tile = @0x555555a3db40, ground = 0x7fffcf1ff4a0, tilePos = {x = 988, y = 985,
            z = 8 '\b'}, flags = 0}
        oldPos = {x = 988, y = 985, z = 8 '\b'}
        newPos = {x = 989, y = 985, z = 8 '\b'}
        teleport = false
        spectators = {vec = std::vector of length 48, capacity 64 = {0x7fffd3e6a280, 0x7fffdf9c9490, 0x7ffff1500860, 0x7fffd15b0c10, 0x7fffd5db9a80, 0x7fffd5db9f40, 0x7ffff2eced30, 0x7fffe10ba560, 0x7fffda8c65f0, 0x7fffd286e0f0,
            0x7ffff375f140, 0x7fffd3bb2910, 0x7fffd84bd280, 0x7fffd1667b60, 0x7ffff2653dc0, 0x7fffe2bc5d30, 0x7fffd4da1c80, 0x7fffd42ff8a0, 0x7fffda47f810, 0x7ffff1fc6370, 0x7fffd273fc70, 0x7fffd5a4a8d0, 0x7fffd52c96c0, 0x7fffe0d6cf20,
            0x7ffff2e0a830, 0x7fffdf57a9a0, 0x7fffd52cb6b0, 0x7ffff1fa5750, 0x7fffdf90d0f0, 0x7ffff33b4d30, 0x7ffff33b51f0, 0x7fffda42bb10, 0x7fffd2131920, 0x7ffff1fb9cf0, 0x7fffe330dab0, 0x7fffd5ab96b0, 0x7fffd5ab9ba0, 0x7fffd953e5d0,
            0x7ffff2ea14b0, 0x7fffd3348490, 0x7fffda1ad180, 0x7fffd45e83d0, 0x7fffd84bb3e0, 0x7fffd8a25570, 0x7fffd5ada510, 0x7fffd5da0940, 0x7ffff2ea1f50, 0x7fffe0de6ca0}}
        newPosSpectators = {vec = std::vector of length 48, capacity 64 = {0x7fffd3e6a280, 0x7fffdf9c9490, 0x7ffff1500860, 0x7fffd15b0c10, 0x7fffd5db9a80, 0x7fffd5db9f40, 0x7ffff2eced30, 0x7fffe10ba560, 0x7fffda8c65f0, 0x7fffd286e0f0,
            0x7ffff375f140, 0x7fffd3bb2910, 0x7fffd84bd280, 0x7fffd1667b60, 0x7ffff2653dc0, 0x7fffe2bc5d30, 0x7fffd4da1c80, 0x7fffd42ff8a0, 0x7fffda47f810, 0x7ffff1fc6370, 0x7fffd273fc70, 0x7fffd5a4a8d0, 0x7fffd52c96c0, 0x7fffe0d6cf20,
            0x7ffff2e0a830, 0x7fffdf57a9a0, 0x7fffd52cb6b0, 0x7ffff1fa5750, 0x7fffdf90d0f0, 0x7ffff33b4d30, 0x7ffff33b51f0, 0x7fffda42bb10, 0x7fffd2131920, 0x7ffff1fb9cf0, 0x7fffe330dab0, 0x7fffd5ab96b0, 0x7fffd5ab9ba0, 0x7fffd953e5d0,
            0x7ffff2ea14b0, 0x7fffd3348490, 0x7fffda1ad180, 0x7fffd45e83d0, 0x7fffd84bb3e0, 0x7fffd8a25570, 0x7fffd5ada510, 0x7fffd5da0940, 0x7ffff2ea1f50, 0x7fffe0de6ca0}}
        oldStackPosVector = std::vector of length 4, capacity 4 = {1, 1, 1, 1}
        leaf = 0x7fffcf1f6460
        new_leaf = 0x7fffcf1f6460
        i = 4
#10 0x0000555555620ef2 in Game::internalMoveCreature (this=0x555555a3b240 <g_game>, creature=..., toTile=..., flags=32) at /home/otsmanager/custom/src/game.cpp:814
        ret = RETURNVALUE_NOERROR
        index = 32520
        toItem = 0x555555a3b290 <g_game+80>
        subCylinder = 0x7ffff5f43ae0
        toCylinder = 0x7fffcf1f6460
        fromCylinder = 0x7fffcf1f9a60
        n = 3750757337
#11 0x0000555555620e35 in Game::internalMoveCreature (this=0x555555a3b240 <g_game>, creature=0x7fffdf90d0f0, direction=DIRECTION_EAST, flags=32) at /home/otsmanager/custom/src/game.cpp:803
        currentPos = @0x7fffdf90d0f8: {x = 989, y = 985, z = 8 '\b'}
        destPos = {x = 989, y = 985, z = 8 '\b'}
        player = 0x0
        diagonalMovement = false
--Type <RET> for more, q to quit, c to continue without paging--
 
Last edited:
Crashed again with first error shown in here, so weird when that script isnt even enabled.
I'm unable to properly interpret the previous one.
However the following might be a hint.
Code:
article = <error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.>
Is there an item with this id?
Code:
type = 21845
 
I'm unable to properly interpret the previous one.
However the following might be a hint.
Code:
article = <error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.>
Is there an item with this id?
Code:
type = 21845
There is, but its a wall and It doesnt exist in any script etc.
thiswall.png
 
what was your tfs version?

post your Game::internalMoveCreature method (L 803).
Its an old tfs 1.3 repo, about a half year old?

Here's a part of it:
Code:
    if (player != movingCreature) {
        if (toTile->hasFlag(TILESTATE_BLOCKPATH)) {
            player->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);
            return;
        } else if ((movingCreature->getZone() == ZONE_PROTECTION && !toTile->hasFlag(TILESTATE_PROTECTIONZONE)) || (movingCreature->getZone() == ZONE_NOPVP && !toTile->hasFlag(TILESTATE_NOPVPZONE))) {
            player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
            return;
        } else {
            if (CreatureVector* tileCreatures = toTile->getCreatures()) {
                for (Creature* tileCreature : *tileCreatures) {
                    if (!tileCreature->isInGhostMode()) {
                        player->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);
                        return;
                    }
                }
            }

            Npc* movingNpc = movingCreature->getNpc();
            if (movingNpc && !Spawns::isInZone(movingNpc->getMasterPos(), movingNpc->getMasterRadius(), toPos)) {
                player->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);
                return;
            }
        }
    }

    if (!g_events->eventPlayerOnMoveCreature(player, movingCreature, movingCreaturePos, toPos)) {
        return;
    }

    ReturnValue ret = internalMoveCreature(*movingCreature, *toTile);
    if (ret != RETURNVALUE_NOERROR) {
        player->sendCancelMessage(ret);
    }
}

ReturnValue Game::internalMoveCreature(Creature* creature, Direction direction, uint32_t flags /*= 0*/)
{
    creature->setLastPosition(creature->getPosition());
    const Position& currentPos = creature->getPosition();
    Position destPos = getNextPosition(direction, currentPos);
    Player* player = creature->getPlayer();

    bool diagonalMovement = (direction & DIRECTION_DIAGONAL_MASK) != 0;
    if (player && !diagonalMovement) {
        //try to go up
        if (currentPos.z != 8 && creature->getTile()->hasHeight(3)) {
THIS IS LINE 803>            Tile* tmpTile = map.getTile(currentPos.x, currentPos.y, currentPos.getZ() - 1);
            if (tmpTile == nullptr || (tmpTile->getGround() == nullptr && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID))) {
                tmpTile = map.getTile(destPos.x, destPos.y, destPos.getZ() - 1);
                if (tmpTile && tmpTile->getGround() && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID)) {
                    flags |= FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE;

                    if (!tmpTile->hasFlag(TILESTATE_FLOORCHANGE)) {
                        player->setDirection(direction);
                        destPos.z--;
                    }
                }
            }
        }

        //try to go down
        if (currentPos.z != 7 && currentPos.z == destPos.z) {
            Tile* tmpTile = map.getTile(destPos.x, destPos.y, destPos.z);
            if (tmpTile == nullptr || (tmpTile->getGround() == nullptr && !tmpTile->hasFlag(TILESTATE_BLOCKSOLID))) {
                tmpTile = map.getTile(destPos.x, destPos.y, destPos.z + 1);
                if (tmpTile && tmpTile->hasHeight(3)) {
                    flags |= FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE;
                    player->setDirection(direction);
                    destPos.z++;
                }
            }
        }
    }

    Tile* toTile = map.getTile(destPos);
    if (!toTile) {
        return RETURNVALUE_NOTPOSSIBLE;
    }
    return internalMoveCreature(*creature, *toTile, flags);
}

ReturnValue Game::internalMoveCreature(Creature& creature, Tile& toTile, uint32_t flags /*= 0*/)
{
    //check if we can move the creature to the destination
    ReturnValue ret = toTile.queryAdd(0, creature, 1, flags);
    if (ret != RETURNVALUE_NOERROR) {
        return ret;
    }

    map.moveCreature(creature, toTile);
    if (creature.getParent() != &toTile) {
        return RETURNVALUE_NOERROR;
    }
This is line 803:
Code:
Tile* tmpTile = map.getTile(currentPos.x, currentPos.y, currentPos.getZ() - 1);
 
🤔
Execute this and show the output
Bash:
git rev-parse --short HEAD
This i got:
fatal: not a git repository (or any of the parent directories): .git

Tried to google search it a bit, but i have no clue what im doing wrong, as usual lol. However! I found the issue with the first error i posted in here, I actually had an obscure and useless lua script doing its thing, crashing the server.
 
Can't know how old it is :S
But the 2nd crash might've been fixed on a later date than the version you currently have.
Why are you not using the latest TFS?
Yeah could be so.

Im not using the newest repo for these 2 reasons:
1. I have everything setup with this old repo, means I will have to redo a lot custom features.
2. I cant compile it successfully in my ubuntu server, but i can compile it on my windows machine.
Linux - Issues compiling newest source on Ubuntu Linux (https://otland.net/threads/issues-compiling-newest-source-on-ubuntu-linux.275288/#post-2652820)
 
Last edited:
Back
Top