Jump to content

Playerbot (archive)


Recommended Posts

Hmm... the call stack from Winslow tells me, that there is no PlayerbotAI component called on the crash. The problem seems to start within Player::Update(), while getting the current map of the player. The highest chance of getting this error would be by trying to get the current map while player has no current map (thread issues). This could happen when i.e taking the boat from eastern kingdoms to kalimdor, while the server and/or player are still loading the new maps, etc. (i.e. free reference to current (old) map, load map/vmap/etc, assign new map to player). Normally there should be a flag set like Player::m_isTeleported...

Still trying to reproduce the problem. Could anyone check if this happens with most recent MaNGOS core without applying any external patches (like PlayerbotAI, AHBot, OutdoorPvP, etc.)? I bet this is a core problem we should report and if we are able to present a fix, also ;)

EDIT: As I thought... it IS indeed a core problem. If player has to update zone (p_time>=m_zoneUpdateTimer) it calls WorldObject::GetZoneAndAreaId(). Which looks like this:

void WorldObject::GetZoneAndAreaId(uint32& zoneid, uint32& areaid) const
{
   GetBaseMap()->GetZoneAndAreaId(zoneid, areaid, m_positionX, m_positionY, m_positionZ);
}

And GetBaseMaps looks like this:

Map const* WorldObject::GetBaseMap() const
{
   ASSERT(m_currMap);
   return m_currMap->GetParent();
}

I think the core DEVs are suggesting that m_currMap is always set. It should never point to nothing... There are no prechecks or boolean return values on GetZoneAndAreaId, GetZoneId and GetAreaId

EDIT2: Could anyone who is experiencing the crash pls set the logs to debug level? After crash check log file for something like:

WORLD: teleport of player %s (%d) to location %d, %f, %f, %f, %f failed

That's a log output posted on the only part of code where WorldObject::ResetMap() is called for a player without calling Player::RemoveFromWorld() before. RemoveFromWorld would set m_isInWorld to false, which will force Player::UPdate to return immediately. That's the only part I can immagine this happens...

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

@Winslow: He, he, he... was just a suggestion. But it is a problem with RemoveFromWorld and ResetMap in some ways. And I think the involvment of the PlayerbotAI is just by posing an existing problem. This can be caused by loading times and other timings as well.

Well... now for better news! An update is coming up:

- bots now can show soulbound items in 'Will not be traded' slot

- added PlayerbotAI::findItemsInEquip

- modified PlayerbotAI::TradeItem to accept a slot number

What it does u ask?

Now you can log in with your enchanter and enchant soulbound and/or equipped items of a bot. I do it this way:

1) Start trading with a bot and also inspect the bot

2) Whisper the bot type in 'nt' and shift-click the equipped item (i.e /w BOTNAME nt [Darth Vader's Helmet])

3) Item will show in 'Will not be traded' slot

4) Close the inspect window and open enchantment window

5) Enchant item in NT slot

6) Accept trade... Tadaa! Soulbound and equipped item is enchanted!

Link to comment
Share on other sites

@Winslow: He, he, he... was just a suggestion. But it is a problem with RemoveFromWorld and ResetMap in some ways. And I think the involvment of the PlayerbotAI is just by posing an existing problem. This can be caused by loading times and other timings as well.

@Runsttren Well I am just getting frustrated have been trying to figure this out. Sorry :confused:

Well... now for better news! An update is coming up:

- bots now can show soulbound items in 'Will not be traded' slot

- added PlayerbotAI::findItemsInEquip

- modified PlayerbotAI::TradeItem to accept a slot number

What it does u ask?

Now you can log in with your enchanter and enchant soulbound and/or equipped items of a bot. I do it this way:

1) Start trading with a bot and also inspect the bot

2) Whisper the bot type in 'nt' and shift-click the equipped item (i.e /w BOTNAME nt [Darth Vader's Helmet])

3) Item will show in 'Will not be traded' slot

4) Close the inspect window and open enchantment window

5) Enchant item in NT slot

6) Accept trade... Tadaa! Soulbound and equipped item is enchanted!

As for the enchanting this is awesome.

Link to comment
Share on other sites

@Winslow: He, he, he... was just a suggestion. But it is a problem with RemoveFromWorld and ResetMap in some ways. And I think the involvment of the PlayerbotAI is just by posing an existing problem. This can be caused by loading times and other timings as well.

@Runsttren

Edit:

void PlayerbotAI::MovementReset() {

// stop moving...

MovementClear();

++ m_ignoreAIUpdatesUntilTime = time(0) + 120;

++ TellMaster("120s later i'll bing coming!.");

This method can be mitigated 1 bot change maps mangos crash,but if More than 1 bot--mangos crash!!I hope there is a better way

Link to comment
Share on other sites

I think the core DEVs are suggesting that m_currMap is always set. It should never point to nothing...

Runsttren, you think in correct way: m_currMap should be valid while player is on map and point to NULL when player is being far teleported. If you have any SEGFAULTS or ACCESS VIOLATIONS - this means that someone screwed map system logic. On clean revs everything works fine so I suggest to learn how new map system is implemented + pay attention to DELAYED TELEPORTS we have to made (look into Player::Update()). Gl ^_^

Link to comment
Share on other sites

Hi guys

Just a quickie but i'm kinda lost at some point

Been using the player bot for some time now and never had any real issues.

Until today i decided to update my entire local server

So i compiled the latest rev of mangos 8280

as usual included "the player bot" and "auctionhouse bot" patches

Checked for any SQL updates from all included sources

All went well server rolling nice and smooth :) so far so good

Than i decided to grab another toon from my acc using the Player_Bot. (NPC Pappy Looter)

At that point all pappy looter had to say was normal gossip message "Welcome *******"

So naturaly i checked my DB to see if Pappy had the correct Scriptname, His scriptname was still Bot_giver

also no changes in flags or something.

just to be sure i deleted him and executed the provided SQL again

After 3 recompiles with and without SD2 and the Auction house patch i still had the issue

where the bot recruiter only says welcome

I did check if recruiting a bot worked using the commands and that worked flawless

only thing i have to add is i'm updating from Rev 8168 so it has been some time i browsed the forums to see if anything is changed, or am i missing something

Well sorry for this big wall of text i hope i didnt critt your eyes by letting you read all of this

Kind regards Tibu

* dunno if it mathers but i'm using Winslows version just love the extras included in his patch

big bow for Winslow, Runsttren and ofc the rest of the dev team huge salute to all of you

Link to comment
Share on other sites

@Tiburan1

* dunno if it mathers but i'm using Winslows version just love the extras included in his patch

big bow for Winslow, Runsttren and ofc the rest of the dev team huge salute to all of you

I took out the NPC Since we can add them. Sorry;)

And added the auto announcer and being able to party with both sides. :)

Link to comment
Share on other sites

I figured it out need to change these line's in player cpp

if (m_playerbotAI)
       m_playerbotAI->UpdateAI(p_time);
   else if (m_playerbotMgr)
       m_playerbotMgr->UpdateAI(p_time);

put them at lines 1356

I pushed .:)

This does not help.

After you switch map, and if you enter combat without bot presents, server crashes.

Map* WorldObject::GetMap() const: Assertion `"m_currMap" &&0' failed.

Link to comment
Share on other sites

This does not help.

After you switch map, and if you enter combat without bot presents, server crashes.

@ckegg What other patches are you using I have teled every ware and went in to heroic and still no crashes

with and with out bots been up for 3 hrs lots of testing.:)

Link to comment
Share on other sites

@winslow

I figured it out need to change these line's in player cpp

Code:

//we should execute delayed teleports only for alive(!) players

//because we don't want player's ghost teleported from graveyard

if(IsHasDelayedTeleport() && isAlive())

TeleportTo(m_teleport_dest, m_teleport_options);

++if (m_playerbotAI)

++ m_playerbotAI->UpdateAI(p_time);

++ else if (m_playerbotMgr)

++ m_playerbotMgr->UpdateAI(p_time);put them at lines 1356

I pushed .

There?TESTING......!

Link to comment
Share on other sites

@ckegg when is the last time you did a pull.

Well i am not crashing anymore what version are you both using.

I am using git://github.com/playerbot/mangos.git repository

and I pulled the version after you changed player.cpp with relocated p_time check

I did many tests too, and all went good. However, I tested a specific one which is entering a instance and leaving a bot outside the instance, or before the bot get in, attack a mob, then it crashes.

If I have time in these day, I would investigate the problem

Link to comment
Share on other sites

@ckegg

I tested a specific one which is entering a instance and leaving a bot outside the instance, or before the bot get in, attack a mob, then it crashes.

sorry that is a good one ....lol why would you do that. :o

But at least we are farther a long than we were and that crash has stopped now there is a new one i am trying to figure out. it has to do with.

Call stack:
Address   Frame     Function      SourceFile
0072D0AC  00000000  PlayerbotAI::HasAura+C
00730E4E  00000000  PlayerbotAI::CastSpell+21E
0083A58B  00000000  PlayerbotWarriorAI::DoNextCombatManeuver+31B
0072E455  00000000  PlayerbotAI::DoNextCombatManeuver+135
007307CC  00000000  PlayerbotAI::UpdateAI+67C
004BAEB5  00000000  Player::Update+E65
00495E16  00000000  Map::Update+D6
0049BDC3  00000000  InstanceMap::Update+13
007E076E  00000000  MapInstanced::Update+DE
005FB058  00000000  MapManager::Update+128
005DF6FB  00000000  World::Update+77B
0042F31E  00000000  WorldRunnable::run+8E
008728F7  00000000  ACE_Based::Thread::ThreadTask+17
666E14D4  00000000  __WSAFDIsSet+FFFFFFFFFFFCC45C
70CF3433  00000000  _endthreadex+44
70CF34C7  00000000  _endthreadex+D8
75D2E4A5  00000000  BaseThreadInitThunk+E
77AFCFED  00000000  RtlCreateUserProcess+8C
77AFD1FF  00000000  RtlCreateProcessParameters+4E
========================
Local Variables And Parameters

Call stack:
Address   Frame     Function      SourceFile
0072D0AC  00000000  PlayerbotAI::HasAura+C
   Local  <user defined> 'iter'
   Local  <user defined> 'this'
punting on symbol spellId
   Local  <user defined> 'player'

00730E4E  00000000  PlayerbotAI::CastSpell+21E
   Local  <user defined> 'this'
punting on symbol spellId
   Local  <user defined> 'pSpell'
punting on symbol targetGUID
   Local  <user defined> 'pTarget'
   Local  <user defined> 'pSpellInfo'

0083A58B  00000000  PlayerbotWarriorAI::DoNextCombatManeuver+31B
   Local  <user defined> 'this'
   Local  <user defined> 'pTarget'
   Local  <user defined> 'ai'
   Local  <user defined> 'pVictim'
   Local  <user defined> 'm_bot'

0072E455  00000000  PlayerbotAI::DoNextCombatManeuver+135
   Local  <user defined> 'this'

007307CC  00000000  PlayerbotAI::UpdateAI+67C
   Local  <user defined> 'pSpell'
   Local  <user defined> 'this'
   Local  <user defined> 'p_time'
punting on symbol currentTime

004BAEB5  00000000  Player::Update+E65
   Local  <user defined> 'this'
punting on symbol p_time
punting on symbol now
   Local  <user defined> 'pet'

00495E16  00000000  Map::Update+D6
   Local  <user defined> 'this'
   Local  <user defined> 't_diff'
   Local  <user defined> 'updater'
   Local  <user defined> 'world_object_update'
   Local  <user defined> 'grid_object_update'

0049BDC3  00000000  InstanceMap::Update+13
   Local  <user defined> 'this'
   Local  <user defined> 't_diff'

007E076E  00000000  MapInstanced::Update+DE
   Local  <user defined> 'this'
   Local  <user defined> 't'
   Local  <user defined> 'i'

005FB058  00000000  MapManager::Update+128
   Local  <user defined> 'iter'
   Local  <user defined> 'this'
punting on symbol diff

005DF6FB  00000000  World::Update+77B
punting on symbol i
   Local  <user defined> 'this'
punting on symbol diff
   Local  unsigned int 'autobroadcaston' = 1

0042F31E  00000000  WorldRunnable::run+8E
punting on symbol diff
   Local  <user defined> 'this'
punting on symbol realCurrTime
punting on symbol realPrevTime
punting on symbol prevSleepTime

008728F7  00000000  ACE_Based::Thread::ThreadTask+17
punting on symbol param
   Local  <user defined> '_task'

666E14D4  00000000  __WSAFDIsSet+FFFFFFFFFFFCC45C

70CF3433  00000000  _endthreadex+44

70CF34C7  00000000  _endthreadex+D8

75D2E4A5  00000000  BaseThreadInitThunk+E

77AFCFED  00000000  RtlCreateUserProcess+8C

77AFD1FF  00000000  RtlCreateProcessParameters+4E

========================
Global Variables

We are having fun.

Link to comment
Share on other sites

Question, does the bot cast healing spells on its own, or do you have to keep commanding it?

The bot can do it on its own aswell atleast thats my XP when i summon my druid.

I recieve buffs and than the bot heals me to full after i recieved the buffs.

Link to comment
Share on other sites

Question, does the bot cast healing spells on its own, or do you have to keep commanding it?

Yes the bot will also heal itself as well as healing you and other party/bot members. I've ran with a party of 5 with me (a hunter), a warrior, a druid, a rogue, and a priest all those were bots and they all did their own thing. Although the running out of mana and sitting down thing was kind of annoying.

Link to comment
Share on other sites

Well you guys sold me, I really wanted to use it but I cant get it to merge with my ahbot...

Please help!

Welcome to Git (version 1.6.3.2-preview20090608)

Run 'git help git' to display the help index.

Run 'git help <command>' to display help for specific commands.

Mightylink@ZVC /c/Northrend (RPPVP)/Mangos Source/mangos + ahbot + playerbot

$ git clone git://github.com/mangos/mangos.git

Initialized empty Git repository in C:/Northrend (RPPVP)/Mangos Source/mangos +

ahbot + playerbot/mangos/.git/

remote: Counting objects: 33651, done.

remote: Compressing objects: 100% (6616/6616), done.

remote: Total 33651 (delta 27014), reused 33616 (delta 26982)

Receiving objects: 100% (33651/33651), 27.33 MiB | 89 KiB/s, done.

Resolving deltas: 100% (27014/27014), done.

Checking out files: 100% (3551/3551), done.

Mightylink@ZVC /c/Northrend (RPPVP)/Mangos Source/mangos + ahbot + playerbot

$ cd mangos

Mightylink@ZVC /c/Northrend (RPPVP)/Mangos Source/mangos + ahbot + playerbot/man

gos (master)

$ git pull git://github.com/Gigelf/mangos.git auctionhouse

remote: Counting objects: 100, done.

remote: Compressing objects: 100% (43/43), done.

remote: Total 65 (delta 51), reused 28 (delta 22)

Unpacking objects: 100% (65/65), done.

From git://github.com/Gigelf/mangos

* branch auctionhouse -> FETCH_HEAD

Auto-merging src/game/Chat.cpp

Auto-merging src/game/Chat.h

Auto-merging src/game/Level3.cpp

Auto-merging src/game/Mail.cpp

Auto-merging src/game/Makefile.am

Auto-merging src/game/World.cpp

Auto-merging src/mangosd/mangosd.conf.dist.in

Auto-merging win/VC80/game.vcproj

Auto-merging win/VC90/game.vcproj

Merge made by recursive.

README.AHBOT | 184 +++++

sql/characters_auctionhousebot.sql | 94 +++

src/game/AuctionHouseBot.cpp | 1423 ++++++++++++++++++++++++++++++++++++

src/game/AuctionHouseBot.h | 919 +++++++++++++++++++++++

src/game/AuctionHouseMgr.h | 3 +

src/game/Chat.cpp | 1 +

src/game/Chat.h | 1 +

src/game/Level3.cpp | 471 ++++++++++++

src/game/Mail.cpp | 16 +

src/game/Makefile.am | 2 +

src/game/World.cpp | 5 +

src/mangosd/mangosd.conf.dist.in | 73 ++

win/VC80/game.vcproj | 6 +

win/VC90/game.vcproj | 6 +

14 files changed, 3204 insertions(+), 0 deletions(-)

create mode 100644 README.AHBOT

create mode 100644 sql/characters_auctionhousebot.sql

create mode 100644 src/game/AuctionHouseBot.cpp

create mode 100644 src/game/AuctionHouseBot.h

Mightylink@ZVC /c/Northrend (RPPVP)/Mangos Source/mangos + ahbot + playerbot/man

gos (master)

$ git pull git://github.com/playerbot/mangos.git master

remote: Counting objects: 1089, done.

remote: Compressing objects: 100% (323/323), done.

remote: Total 951 (delta 780), reused 770 (delta 628)iB/s

Receiving objects: 100% (951/951), 327.16 KiB | 89 KiB/s, done.

Resolving deltas: 100% (780/780), completed with 48 local objects.

From git://github.com/playerbot/mangos

* branch master -> FETCH_HEAD

Auto-merging src/game/CharacterHandler.cpp

Auto-merging src/game/Chat.cpp

Auto-merging src/game/Chat.h

Auto-merging src/game/Makefile.am

Auto-merging src/game/Player.cpp

Auto-merging src/game/WorldSession.cpp

Auto-merging src/mangosd/mangosd.conf.dist.in

CONFLICT (content): Merge conflict in src/mangosd/mangosd.conf.dist.in

Auto-merging win/VC90/game.vcproj

Automatic merge failed; fix conflicts and then commit the result.

Mightylink@ZVC /c/Northrend (RPPVP)/Mangos Source/mangos + ahbot + playerbot/man

gos (master|MERGING)

$

I also tried player bot first and auction bot second, same problem...

Link to comment
Share on other sites

Well you guys sold me, I really wanted to use it but I cant get it to merge with my ahbot...

Please help!

I also tried player bot first and auction bot second, same problem...

Often times when you want to run to or more patches on your server you will have to manually patch it, using something like Winmerge (one a windows Machine, sorry for the assumption). It's what I had to do anyway.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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