• 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!

Programmer I'm looking for a very expert programmer

MineCraft

New Member
Joined
Oct 24, 2022
Messages
3
Reaction score
0
Need an expert programmer to solve a super rare crash in Decay.

Lua:
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00005555556c696b in virtual thunk to Item::isRemoved() const ()
[Current thread is 1 (Thread 0x7ffff2c23700 (LWP 5109))]
(gdb) bt full
#0  0x00005555556c696b in virtual thunk to Item::isRemoved() const () at /home/SERVER/src/item.h:1163
No symbol table info available.
#1  0x00005555557ea0fd in Item::canDecay (this=0x7fff9ffc0ba0) at /home/SERVER/src/item.cpp:2810
        it = <optimized out>
        hasDecayId = <optimized out>
#2  0x0000555555732380 in Decay::checkDecay (this=0x555555dd6380 <g_decay>) at /home/SERVER/src/decay.cpp:155
        item = 0x7fff9ffc0ba0
        __for_range = <optimized out>
        __for_begin = <optimized out>
        __for_end = <optimized out>
        timestamp = <optimized out>
        tempItems = Python Exception <class 'gdb.error'> value has been optimized out:

        it = <optimized out>
        end = <optimized out>
        __func__ = <optimized out>
#3  0x0000555555a3916c in std::function<void ()>::operator()() const (this=<optimized out>) at /usr/include/c++/7/bits/std_function.h:706
No locals.
#4  Task::operator() (this=<optimized out>) at /home/SERVER/src/tasks.h:43
No locals.
#5  Dispatcher::threadMain (this=0xffff4a4871f8) at /home/SERVER/src/tasks.cpp:70
        task = 0x7fffa582aa20
        taskLockUnique = {_M_device = 0x555556de1338 <g_dispatcher+24>, _M_owns = false}
        time_point = <optimized out>
#6  0x00007ffff615f6df in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#7  0x00007ffff688d6db in start_thread (arg=0x7ffff2c23700) at pthread_create.c:463
        pd = 0x7ffff2c23700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737266202368, -8812611808217471161, 140737266200448, 0, 93825018300224, 140737488345984,
                8812618425186182983, 8812626729778341703}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0,
              canceltype = 0}}}
        not_first_call = <optimized out>
#8  0x00007ffff581c61f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.

Lua:
#1  0x00005555557ea0fd in Item::canDecay (this=0x7fff9ffc0ba0) at /home/SERVER/src/item.cpp:2810
2810    /home/SERVER/src/item.cpp: No such file or directory.
(gdb) print this
$2 = (const Item * const) 0x7fff9ffc0ba0
(gdb) print this.id
$3 = 2053

it seems was crashed in a torch item, but no idea how to reproduce.
 
Last edited:
Most likely it is caused by isRemoved check on item that doesn't exist anymore but ptr location in memory is still saved and being checked so location is saved but data is nothing so that what segmentation fault means, linking to pointer that doesn't exist or ((doesn't exist anymore)) my expectation is you might have anti-clone system in your source if not then it can be called by lua im not sure more info should be extracted from the crash report and would be solved, try to check isRemoved function and how it works (does it have any protection from destructed pointers? i don't think so
 
Most likely it is caused by isRemoved check on item that doesn't exist anymore but ptr location in memory is still saved and being checked so location is saved but data is nothing so that what segmentation fault means, linking to pointer that doesn't exist or ((doesn't exist anymore)) my expectation is you might have anti-clone system in your source if not then it can be called by lua im not sure more info should be extracted from the crash report and would be solved, try to check isRemoved function and how it works (does it have any protection from destructed pointers? i don't think so
if you get a value from pointer that points to a memory location it returns garbage not crash (its ub though). C++ definitely crashes if your pointer is pointing to nothing, so to null location or when you mutate the pointer that points to invalid location
 
if you get a value from pointer that points to a memory location it returns garbage not crash (its ub though). C++ definitely crashes if your pointer is pointing to nothing, so to null location or when you mutate the pointer that points to invalid location
pointer, which points to freed memory can cause segmentation fault :)
 
Back
Top