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

bomberman-tfs-1.x

_M4G0_

Well-Known Member
Joined
Feb 6, 2016
Messages
504
Solutions
16
Reaction score
98
I decided post this event for i don't have support chaitosoft where i buy this event
i my server cause crash
 

Attachments

  • cs-bomberman-tfs-1.x.rar
    10.2 KB · Views: 98 · VirusTotal
I have this bug
Code:
#0  0x00000000005ec23e in Game::internalRemoveItem(Item*, int, bool, unsigned int) ()
No symbol table info available.
#1  0x000000000070581e in LuaScriptInterface::luaItemRemove(lua_State*) ()
No symbol table info available.
#2  0x0000648b4ffbaa88 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2
No symbol table info available.
#3  0x0000648b4fffdf60 in lua_pcall ()
   from /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2
No symbol table info available.
#4  0x000000000069b13a in LuaScriptInterface::protectedCall(lua_State*, int, int) ()
No symbol table info available.
#5  0x000000000069becf in LuaScriptInterface::callFunction(int) ()
No symbol table info available.
#6  0x000000000071a4cf in LuaEnvironment::executeTimerEvent(unsigned int) ()
No symbol table info available.
#7  0x000000000072fcc4 in void std::_Mem_fn<void (LuaEnvironment::*)(unsigned int)>::operator()<unsigned int&, void>(LuaEnvironment*, unsigned int&) const ()
No symbol table info available.
#8  0x000000000072c549 in void std::_Bind<std::_Mem_fn<void (LuaEnvironment::*)(unsigned int)> (LuaEnvironment*, unsigned int)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>) ()
No symbol table info available.
#9  0x0000000000728286 in void std::_Bind<std::_Mem_fn<void (LuaEnvironment::*)(unsigned int)> (LuaEnvironment*, unsigned int)>::operator()<, void>() ()
No symbol table info available.
#10 0x0000000000723457 in std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (LuaEnvironment::*)(unsigned int)> (LuaEnvironment*, unsigned int)> >::_M_invoke(std::_Any_data const&) ()
No symbol table info available.
#11 0x000000000082c542 in std::function<void ()>::operator()() const ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#12 0x000000000082c42c in Task::operator()() ()
No symbol table info available.
#13 0x000000000082bc38 in Dispatcher::threadMain() ()
No symbol table info available.
#14 0x0000000000786485 in void std::_Mem_fn<void (Dispatcher::*)()>::operator()<, void>(Dispatcher*) const ()
No symbol table info available.
#15 0x0000000000785ded in void std::_Bind_simple<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) ()
No symbol table info available.
#16 0x0000000000785663 in std::_Bind_simple<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)>::operator()() ()
No symbol table info available.
#17 0x0000000000784f88 in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)> >::_M_run() ()
No symbol table info available.
#18 0x0000648b4f26c970 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#19 0x0000648b4f4c9064 in start_thread (arg=0x648b4da19700)
    at pthread_create.c:309
        __res = <optimized out>
        pd = 0x648b4da19700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {110549465667328,
                -8556819557150987705, 1, 110549515382880, 124999948702864,
                110549465667328, 4636045363485502023, 4636050559382350407},
              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"
#20 0x0000648b4e9dc62d in clone ()
---Type <return> to continue, or q <return> to quit---
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.
 
I have this bug
Code:
#0  0x00000000005ec23e in Game::internalRemoveItem(Item*, int, bool, unsigned int) ()
No symbol table info available.
#1  0x000000000070581e in LuaScriptInterface::luaItemRemove(lua_State*) ()
No symbol table info available.
#2  0x0000648b4ffbaa88 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2
No symbol table info available.
#3  0x0000648b4fffdf60 in lua_pcall ()
   from /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2
No symbol table info available.
#4  0x000000000069b13a in LuaScriptInterface::protectedCall(lua_State*, int, int) ()
No symbol table info available.
#5  0x000000000069becf in LuaScriptInterface::callFunction(int) ()
No symbol table info available.
#6  0x000000000071a4cf in LuaEnvironment::executeTimerEvent(unsigned int) ()
No symbol table info available.
#7  0x000000000072fcc4 in void std::_Mem_fn<void (LuaEnvironment::*)(unsigned int)>::operator()<unsigned int&, void>(LuaEnvironment*, unsigned int&) const ()
No symbol table info available.
#8  0x000000000072c549 in void std::_Bind<std::_Mem_fn<void (LuaEnvironment::*)(unsigned int)> (LuaEnvironment*, unsigned int)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>) ()
No symbol table info available.
#9  0x0000000000728286 in void std::_Bind<std::_Mem_fn<void (LuaEnvironment::*)(unsigned int)> (LuaEnvironment*, unsigned int)>::operator()<, void>() ()
No symbol table info available.
#10 0x0000000000723457 in std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (LuaEnvironment::*)(unsigned int)> (LuaEnvironment*, unsigned int)> >::_M_invoke(std::_Any_data const&) ()
No symbol table info available.
#11 0x000000000082c542 in std::function<void ()>::operator()() const ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#12 0x000000000082c42c in Task::operator()() ()
No symbol table info available.
#13 0x000000000082bc38 in Dispatcher::threadMain() ()
No symbol table info available.
#14 0x0000000000786485 in void std::_Mem_fn<void (Dispatcher::*)()>::operator()<, void>(Dispatcher*) const ()
No symbol table info available.
#15 0x0000000000785ded in void std::_Bind_simple<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) ()
No symbol table info available.
#16 0x0000000000785663 in std::_Bind_simple<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)>::operator()() ()
No symbol table info available.
#17 0x0000000000784f88 in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)> >::_M_run() ()
No symbol table info available.
#18 0x0000648b4f26c970 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#19 0x0000648b4f4c9064 in start_thread (arg=0x648b4da19700)
    at pthread_create.c:309
        __res = <optimized out>
        pd = 0x648b4da19700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {110549465667328,
                -8556819557150987705, 1, 110549515382880, 124999948702864,
                110549465667328, 4636045363485502023, 4636050559382350407},
              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"
#20 0x0000648b4e9dc62d in clone ()
---Type <return> to continue, or q <return> to quit---
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.
Any solution?
 
actually is cus its trying to remove an item with the addevent and (probably) the item does not exist. add a check on every addevent call like

Lua:
            addEvent(function()
                for k, v in pairs(BOMBERMAN_MINIGAME.items_cache) do
                    if v.map == map then
                        local item = Tile(v.pos):getItems()
                        for i = 1, #item do
                            if item[i] then
                                item[i]:remove(item[i]:getCount())
                            end
                        end
                        Game.createItem(v.itemid, 1, v.pos)
                        BOMBERMAN_MINIGAME.items_cache[k] = nil
                    end
                end
               
                for k, v in pairs(BOMBERMAN_MINIGAME.player_cache) do
                    if v.map == map then
                        BOMBERMAN_MINIGAME.player_cache[k] = nil
                    end
                end
                BOMBERMAN_MINIGAME.rebuilding_map = false
            end, BOMBERMAN_MINIGAME.map_rebuild_time)
 
actually is cus its trying to remove an item with the addevent and (probably) the item does not exist. add a check on every addevent call like

Lua:
            addEvent(function()
                for k, v in pairs(BOMBERMAN_MINIGAME.items_cache) do
                    if v.map == map then
                        local item = Tile(v.pos):getItems()
                        for i = 1, #item do
                            if item[i] then
                                item[i]:remove(item[i]:getCount())
                            end
                        end
                        Game.createItem(v.itemid, 1, v.pos)
                        BOMBERMAN_MINIGAME.items_cache[k] = nil
                    end
                end
              
                for k, v in pairs(BOMBERMAN_MINIGAME.player_cache) do
                    if v.map == map then
                        BOMBERMAN_MINIGAME.player_cache[k] = nil
                    end
                end
                BOMBERMAN_MINIGAME.rebuilding_map = false
            end, BOMBERMAN_MINIGAME.map_rebuild_time)
it has this function in the lib file
 
I think it's fixed in the sourcer (too) checking if the item is nill, I'll use this system, if anyone knows how to reproduce the bug, message me
 
I do not think you guys read so I will repeat it again.
As you can see in the crash log the problem happens when some item is removed so, add a check for every item like I did on my answer.

@ontopic
Also if you say: I already solved but forgot how or you solved but you dont want to collaborate go f*ck urself
 
I do not think you guys read so I will repeat it again.
As you can see in the crash log the problem happens when some item is removed so, add a check for every item like I did on my answer.

@ontopic
Also if you say: I already solved but forgot how or you solved but you dont want to collaborate go f*ck urself

in fact, this not fixed, only if I forgot something:

Lua:
function Position:bombermanExplode(defpos, player)
    local tile = Tile(self)
    local item = tile and tile:getItems() or {}
    local cache = BOMBERMAN_MINIGAME.player_cache[player:getId()]
   
    if not cache then
        if tile:getItemById(BOMBERMAN_MINIGAME.bomb_id) then
            tile:getItemById(BOMBERMAN_MINIGAME.bomb_id):remove(1)
        end
        return
    end
   
    local map = cache.map
   
    self:sendMagicEffect(BOMBERMAN_MINIGAME.explode_effect)
    for i = 1, tile:getItemCount() do
        if isInArray(BOMBERMAN_MINIGAME.explosive_items, item[i]:getId()) then
            addEvent(function()
                self:sendMagicEffect(BOMBERMAN_MINIGAME.exploded_item_remove_effect)
                table.insert(BOMBERMAN_MINIGAME.items_cache, {itemid = item[i]:getId(), pos = self, map = map})
                if item[i] then
                item[i]:remove(item[i]:getCount())
                end
               
                local rand = math.random(1, 100)
                if rand <= BOMBERMAN_MINIGAME.drop_item_chance then
                    local upgrade = {BOMBERMAN_MINIGAME.speed_up_item, BOMBERMAN_MINIGAME.range_up_item, BOMBERMAN_MINIGAME.bomb_up_item}
                    upgrade = upgrade[math.random(1, #upgrade)]
                   
                    local item = Game.createItem(upgrade.itemid, 1, self)
                    item:setActionId(BOMBERMAN_MINIGAME.movement_actionid)
                    self:sendMagicEffect(BOMBERMAN_MINIGAME.exploded_upgrade_item_effect)
                end
            end, BOMBERMAN_MINIGAME.exploded_item_remove_time)
            break
        elseif defpos == self and item[i]:getId() == BOMBERMAN_MINIGAME.bomb_id then
            if item[i] then
            item[i]:remove(item[i]:getCount())
            end
        elseif item[i]:getId() == BOMBERMAN_MINIGAME.bomb_id and defpos ~= self then
            if item[i] then
            item[i]:remove(item[i]:getCount())
            end
            self:bombermanParseExplodeArea(player)
        elseif isInArray({BOMBERMAN_MINIGAME.speed_up_item.itemid, BOMBERMAN_MINIGAME.range_up_item.itemid, BOMBERMAN_MINIGAME.bomb_up_item.itemid}, item[i]:getId()) then
            if item[i] then
            item[i]:remove(item[i]:getCount())
            end
            self:sendMagicEffect(BOMBERMAN_MINIGAME.exploded_upgrade_item_effect)
        end
    end
   
    local kill = tile:getTopCreature()
    local killcache = kill and kill:isPlayer() and BOMBERMAN_MINIGAME.player_cache[kill:getId()] or false
   
    if killcache then
       
        if kill:getId() ~= player:getId() then
            cache.kill = cache.kill+1
            kill:sendTextMessage(BOMBERMAN_MINIGAME.messages.bomb_death.type, string.format(BOMBERMAN_MINIGAME.messages.bomb_death.msg, player:getName()))
            player:sendTextMessage(BOMBERMAN_MINIGAME.messages.bomb_kill.type, string.format(BOMBERMAN_MINIGAME.messages.bomb_kill.msg, kill:getName()))
            player:sendChannelMessage("", string.format(BOMBERMAN_MINIGAME.messages.channel_kill.msg, player:getName(), kill:getName()), BOMBERMAN_MINIGAME.messages.channel_kill.type, BOMBERMAN_MINIGAME.channelId)
        else
            player:sendTextMessage(BOMBERMAN_MINIGAME.messages.bomb_suicide.type, BOMBERMAN_MINIGAME.messages.bomb_suicide.msg)
            player:sendChannelMessage("", string.format(BOMBERMAN_MINIGAME.messages.channel_suicide.msg, player:getName()), BOMBERMAN_MINIGAME.messages.channel_suicide.type, BOMBERMAN_MINIGAME.channelId)
        end
       
        killcache.death = true
        kill:changeSpeed(-kill:getSpeed())
        kill:changeSpeed(killcache.speed)
       
        if BOMBERMAN_MINIGAME.spectators then
            kill:teleportTo(BOMBERMAN_MINIGAME.maps[map].player_death_spec_pos)
            --print("Base Speed 1:", kill:getBaseSpeed())
            --kill:changeSpeed(kill:getBaseSpeed())
        else
            kill:teleportTo(kill:getTown():getTemplePosition())
            --print("Base Speed 2:", kill:getBaseSpeed())
            kill:bombermanSave() -- cade essa função?
            killcache.ingame = false
        end
       
        local players = 0
       
        for k, v in pairs(BOMBERMAN_MINIGAME.player_cache) do
            if not v.death and v.map == map then
                players = players+1
            end
        end
       
        if players == 1 then
            player:sendChannelMessage("", string.format(BOMBERMAN_MINIGAME.messages.channel_winner.msg, player:getName()), BOMBERMAN_MINIGAME.messages.channel_winner.type, BOMBERMAN_MINIGAME.channelId)
           
            for k, v in pairs(BOMBERMAN_MINIGAME.reward) do
                player:addItem(v.itemid, v.count)
            end
           
           
            if BOMBERMAN_MINIGAME.spectators then
                for k, v in pairs(BOMBERMAN_MINIGAME.player_cache) do
                    if v.map == map then
                        Player(k):teleportTo(Player(k):getTown():getTemplePosition())
                    end
                end
            else
                if BOMBERMAN_MINIGAME.player_cache[player:getId()].ingame then
                    player:teleportTo(player:getTown():getTemplePosition())
                    print("Base Speed 4:", player:getBaseSpeed())
                end
            end
           
            BOMBERMAN_MINIGAME.rebuilding_map = true
           
            addEvent(function()
                for k, v in pairs(BOMBERMAN_MINIGAME.items_cache) do
                    if v.map == map then
                        local item = Tile(v.pos):getItems()
                        for i = 1, #item do
                            if item[i] then
                                item[i]:remove(item[i]:getCount())
                            end
                        end
                        Game.createItem(v.itemid, 1, v.pos)
                        BOMBERMAN_MINIGAME.items_cache[k] = nil
                    end
                end
              
                for k, v in pairs(BOMBERMAN_MINIGAME.player_cache) do
                    if v.map == map then
                        BOMBERMAN_MINIGAME.player_cache[k] = nil
                    end
                end
                BOMBERMAN_MINIGAME.rebuilding_map = false
            end, BOMBERMAN_MINIGAME.map_rebuild_time)
        end
    end
end

I will not use this event any more, just a point
 
Back
Top