• 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 Bug in all src 0.3.6/0.4/tfs2.x (crash server when move item)

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
201
Hi, how are you?
I noticed that all sources 0.3.6 / 0.4 / tfs2.x (all for version 8.6) have a common bug that crashes the server.
When you do any script add or remove item in movements.xml, when you create the item straight to the body and throw the item on the floor, the server crashes.

When u create a item:
/i 2505 and it goes straight to the body of the player, when you move this item straight to the floor, the server drops.
For example this script, in movements:
movements.xml
Code:
 <movevent type="Equip" itemid="2130" slot="armor" event="script" value="test.lua"/>
Code:
local id = 2130 -- amulet id
function onEquip(cid, item, slot)
if item.itemid == id and (slot ~= CONST_SLOT_NECKLACE) then
return false
end
end

is there a solution to this bug?

edit: gdb result
Code:
Segmentation fault (core dumped)
root@proxy:/home/narutoBW# gdb theforgottenserver core.3
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from theforgottenserver...(no debugging symbols found)...done.
warning: core file may not match specified executable file.
[New LWP 5184]
[New LWP 5183]
[New LWP 5186]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./theforgottenserver'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000004bcbaf in Game::playerMoveThing(unsigned int, Position const&, unsigned short, short, Position const&, unsigned char) ()
[Current thread is 1 (Thread 0x7f0d2a83f700 (LWP 5184))]
(gdb) bt full
#0  0x00000000004bcbaf in Game::playerMoveThing(unsigned int, Position const&, unsigned short, short, Position const&, unsigned char) ()
No symbol table info available.
#1  0x00000000004c1385 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<bool, boost::_mfi::mf6<bool, Game, unsigned int, Position const&, unsigned short, short, Position const&, unsigned char>, boost::_bi::list7<boost::_bi::value<Game*>, boost::_bi::value<unsigned int>, boost::_bi::value<Position>, boost::_bi::value<unsigned short>, boost::_bi::value<short>, boost::_bi::value<Position>, boost::_bi::value<unsigned char> > >, void>::invoke(boost::detail::function::function_buffer&) ()
No symbol table info available.
#2  0x000000000049ba1a in Dispatcher::dispatcherThread(void*) ()
No symbol table info available.
#3  0x00007f0d2e8095d5 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
No symbol table info available.
#4  0x00007f0d2d4ec6ba in start_thread (arg=0x7f0d2a83f700)
    at pthread_create.c:333
        __res = <optimized out>
        pd = 0x7f0d2a83f700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139694524593920,
                -8886045072608894631, 0, 140737036462271, 139694524594624,
---Type <return> to continue, or q <return> to quit---


when U look item, server crashed too
Code:
Reading symbols from theforgottenserver...(no debugging symbols found)...done.

warning: core file may not match specified executable file.
[New LWP 5172]
[New LWP 5171]
[New LWP 5173]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./theforgottenserver'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000004a4770 in Game::playerLookAt(unsigned int, Position const&, unsigned short, short) ()
[Current thread is 1 (Thread 0x7f9d42233700 (LWP 5172))]
(gdb) bf full
Undefined command: "bf".  Try "help".
(gdb) bt full
#0  0x00000000004a4770 in Game::playerLookAt(unsigned int, Position const&, unsigned short, short) ()
No symbol table info available.
#1  0x000000000049ba1a in Dispatcher::dispatcherThread(void*) ()
No symbol table info available.
#2  0x00007f9d461fd5d5 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
No symbol table info available.
#3  0x00007f9d44ee06ba in start_thread (arg=0x7f9d42233700)
    at pthread_create.c:333
        __res = <optimized out>
        pd = 0x7f9d42233700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140313396197120,
                -4174413149968897944, 0, 140730417527599, 140313396197824,
                9382152, 4119391907147311208, 4119395661795321960},
              mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0},
            data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
---Type <return> to continue, or q <return> to quit---
 
Last edited:
Back
Top