Jump to content

Recommended Posts

Posted

Hello, community!

After compilation of v22.03.123 on Ubuntu 22.04 there is core dump with Playerbots enabled.

And it's all OK with Playerbots disabled.

How to resolve this issue?

 

Mangosone server
Commit version = v22.03.123
cmake
-DSOAP=0 -DPCH=1 -DSCRIPT_LIB_ELUNA=1 -DSCRIPT_LIB_SD3=1 -DPLAYERBOTS=1 -DBUILD_REALMD=0 -DBUILD_TOOLS=0 -DUSE_STORMLIB=1

Host
Linux 6.8.0-52-generic #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC
cmake 3.22.1

mangosd log tail
...
133/99 Bot Andagis logged in
free(): double free detected in tcache 2
Aborted (core dumped)

 

Posted

Is this issue solved? Or its wrong?

File: server/src/modules/Bots/playerbot/PlayerbotAI.cpp

Function: bool PlayerbotAI::CastSpell(uint32 spellId, Unit* target)

Error RowNum: 1343

To resolve we need to delete double "delete spell;" instruction?


    if (!bot->IsInFront(faceTo, sPlayerbotAIConfig.sightDistance, CAST_ANGLE_IN_FRONT) && !bot->IsTaxiFlying())
    {
        bot->SetFacingTo(bot->GetAngle(faceTo));
        spell->cancel();
        delete spell;
        SetNextCheckDelay(sPlayerbotAIConfig.globalCoolDown);
        delete spell;
        return false;
    }

 

Posted

Hi begemotik,

I was talking with someone on our Discord channel who has been arm's deep into the MaNGOS Zero playerbot code, and he concurs with your observation that it is likely a fragment of a merge.

Try deleting one of the calls, and then rebuild your mangosd binary/executable.

Let us know how that goes! If it works out, then you can submit that as a commit to the codebase :D 

 

Thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use