Jump to content

Playerbot


Recommended Posts

Hi Guys,

@draoth I have created a working playerbot patch for MaNGOS One. The code is based upon the code on 'portalzero' and has the same restrictions reflected by existing core development. When time permits we will incorporate some of the new features being developed for playerbot. I will shorty push the code to a new (Beta) repo 'portalone', so you can start testing it.

@UnkleNuke Yes, the plan is to eventually create repos to hold the release (most stable) code, analogous to the existing playerbot repo.

It would be appropriate for them to be called

playerbot (existing repo)

playerbot-zero (to be created)

playerbot-one (to be created)

However at this present time, the code on 'portalzero' and the soon to be created 'portalone' has not been fully tested. Interesting you said

With the Zero site and forums turning into a ghost town, the 1.12 fans have returned to these forums and only just begun to learn about some of the backports.

Feedback from users is all important, as we can't put in the many hours of gaming necessary to fully test out the code. All contructive feedback is useful, but we tend only told to be about problems with the code. We're not necessarily looking for praise, although it's good for the soul ;) , but it would be useful to occasionally get good reports. We can then judge when it is most appropriate to push the test code the the release repos.

The purpose of the many playerbot repos is explained in the Playerbot Wiki.

@Syenet Yes, there is quite a difference between the code that exists on 'playerbot/mangos' and the code in development on 'new-ai'

I see the changes ahead of 'master' in 'new-ai'

This can cause issues, as you have observed with the documentation. The syntax of some commands have changed. A good example is the 'report' command that you cite. On the 'playerbot/mangos' repo this is still a separate command. However on the development repos it has now been amalgamated into the 'quest' command, as a sub-command. As I have said above, until we are happy that the code ready to be pushed, it will remain where it is and this disparity between the repos will remain. I do apologise if this causes problems. The new ingame 'help' system currently been tested, will give a more accurate description of the command syntax on each particular repo.

Hope this helps

Link to comment
Share on other sites

  • Replies 799
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for the info.

I made a patch of core-portal to get what have been modified on the basis of the original core, but I can't find how exactly a bot is actually created. I think some codes in 'CharacterHandler.cpp', 'Player.cpp', 'WorldSession.cpp' might do the trick. I searched for '.bot add' in order to take a tour through the creating & initializing process, but no result. Could you spare some time to give me a little description of it?

Edit: OK, I find '.bot add' in 'ChatHandler::HandlePlayerbotCommand(char* args)', I'll trace the call stack, sorry for my hasty request.

Link to comment
Share on other sites

I think these are the creating procedures:

1. bool ChatHandler::HandlePlayerbotCommand(char* args)

handle '.bot add' command, create PlayerbotMgr;

2. void PlayerbotMgr::AddPlayerBot(ObjectGuid playerGuid)

log in bot, load character data from db

3. void HandlePlayerBotLoginCallback(QueryResult * /*dummy*/, SqlQueryHolder * holder)

create bot's session (I don't quite understand what 'worldsession' actually is)

4. void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)

initialize bot's properties and other things related, just as real players are treated

5. void PlayerbotMgr::OnBotLogin(Player * const bot)

create PlayerbotAI, set party status

and then these are called in sequence every few seconds:

1. void Player::Update( uint32 update_diff, uint32 p_time )

update Player's status

2. void PlayerbotAI::UpdateAI(const uint32 /*p_time*/)

update bot's status and decide what to do accordingly

3. PlayerbotClassAI's methods overrided by those in each class such as 'PlayerbotDruidAI.cpp'

the specific behaviors of bot

EDIT: I found a new issue:

Command 'skill learn [LINK]' will cause the server to crash, tested several times and confirmed in both 'playerbot/mangos' & 'portal_new-ai'.

This is the log file:

2012-01-10 16:48:03 ERROR:SESSION: received not allowed opcode CMSG_LFG_GET_STATUS (0x0296)

2012-01-10 16:48:03 ERROR:SESSION: received not allowed opcode CMSG_LFG_GET_STATUS (0x0296)

This is the crash info:

Exception code: C0000005 ACCESS_VIOLATION

Fault address: 004E4B53 01:000E3B53 E:\\mangos\\alpha\\mangosd.exe

Registers:

EAX:00000000

EBX:0839FA6C

ECX:00000000

EDX:001DBFAC

ESI:00000000

EDI:0839FCE8

CS:EIP:0023:004E4B53

SS:ESP:002B:0839FA3C EBP:0839FA4C

DS:002B ES:002B FS:0053 GS:002B

Flags:00010206

Call stack:

Address Frame Function SourceFile

004E4B53 00000000 ?SetLevitate@Creature@@QAEX_N@Z+1A3

004E6576 00000000 ?GetScriptName@Creature@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ+CF6

0053D53A 00000000 ?_HandleCommandSkill@PlayerbotAI@@AAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAVPlayer@@@Z+33A

00552B4A 00000000 ?HandleCommand@PlayerbotAI@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAVPlayer@@@Z+A3A

00875596 00000000 ?HandleMessagechatOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z+486

0063FC31 00000000 ?ExecuteOpcode@WorldSession@@AAEXABUOpcodeHandler@@PAVWorldPacket@@@Z+21

00644DED 00000000 ?Update@WorldSession@@QAE_NAAVPacketFilter@@@Z+BD

0048FF84 00000000 ?SetVisibleAura@SpellAuraHolder@@QAEX_N@Z+4C84

00492122 00000000 ?SetVisibleAura@SpellAuraHolder@@QAEX_N@Z+6E22

0045D8C2 00000000 ??4BarGoLink@@QAEAAV0@ABV0@@Z+4CE2

570A7064 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74

6D9AC556 00000000 _endthreadex+3A

6D9AC600 00000000 _endthreadex+E4

7546F13C 00000000 BaseThreadInitThunk+E

7753D80D 00000000 RtlCreateUserProcess+8C

7753DA1F 00000000 RtlCreateProcessParameters+4E

In addition, am I supposed to debug the code only by examining logs? I tried debugging directly in VS2010 and it told me it couldn't open program 'game.lib'. Can I debug it line by line using break points?

Link to comment
Share on other sites

I think these are the creating procedures:

1. bool ChatHandler::HandlePlayerbotCommand(char* args)

handle '.bot add' command, create PlayerbotMgr;

2. void PlayerbotMgr::AddPlayerBot(ObjectGuid playerGuid)

log in bot, load character data from db

3. void HandlePlayerBotLoginCallback(QueryResult * /*dummy*/, SqlQueryHolder * holder)

create bot's session (I don't quite understand what 'worldsession' actually is)

4. void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)

initialize bot's properties and other things related, just as real players are treated

5. void PlayerbotMgr::OnBotLogin(Player * const bot)

create PlayerbotAI, set party status

Looks good. I'm not completely sure what a worldsession is (and it doesn't help that MaNGOS english cannot be counted on to be descriptive) but near as I can tell is it's an account's life-cycle upon login. You can't create a player without it. Although I probably shouldn't try explaining it - this is the part that's tripping me up with autobot development.

EDIT: I found a new issue:

Command 'skill learn [LINK]' will cause the server to crash, tested several times and confirmed in both 'playerbot/mangos' & 'portal_new-ai'.

This is the log file:

2012-01-10 16:48:03 ERROR:SESSION: received not allowed opcode CMSG_LFG_GET_STATUS (0x0296)

2012-01-10 16:48:03 ERROR:SESSION: received not allowed opcode CMSG_LFG_GET_STATUS (0x0296)

In addition, am I supposed to debug the code only by examining logs? I tried debugging directly in VS2010 and it told me it couldn't open program 'game.lib'. Can I debug it line by line using break points?

This is actually not a new issue. Someone reported it, I confirmed it, blueboy could not reproduce the bug (which I can also confirm), and was later brought up by a few more people. You are, however, the first to provide us with logs and a crash dump. Oh, by the way, which database are you using?

As for VS2010 debugging, it's not always helpful (and I'm sure blueboy's linux debugging tool is superior), but I get a stack trace when I debug with VS2010, resulting in about 2/3 chance it leads me back to the offending function. Breakpoints could help, assuming you know where to look, allowing you to see the server state before the crash.

Link to comment
Share on other sites

Hi Guys

I can see that discussion on the thread is going to get confusing. I don't really want to run three separate threads for each of the supported cores. However, I'm going to insist that you begin all your posts by specifying which core you're using.

@Syenet The sequence you list looks about right.

If your attempting to run a playerbot patch on MaNGOS One, based upon the latest playerbot code you're going to have big problems. Many of the core features (current MaNGOS core) are not supported in the backports. All credit to you for resolving merge and compile issues. But as you have found, there will be lots of runtime issues.

I have based my patch upon the playerbot code for MaNGOS Zero. This still causes runtime issues, but not as many. To demonstrate the problems we face in supporting code on the three cores, I will show you how the packet data format has changed for one particular opcode

CMSG_CAST_SPELL

Data Lengths

8 - uint64 or ObjectGuid

4 - uint32

2 - uint16

1 - uint8

MaNGOS Zero

WorldPacket* const packet = new WorldPacket(CMSG_CAST_SPELL, 4+2+8);

*packet << spellId;

*packet << target_type;

*packet << m_lootCurrent.WriteAsPacked();

m_bot->GetSession()->QueuePacket(packet); // queue the packet to get around race condition

MaNGOS One

WorldPacket* const packet = new WorldPacket(CMSG_CAST_SPELL, 4+1+4+8);

*packet << spellId;

*packet << uint8(0); // spells cast count;

*packet << uint32(target_type);

*packet << m_lootCurrent.WriteAsPacked();

m_bot->GetSession()->QueuePacket(packet); // queue the packet to get around race condition */

MaNGOS (Two current core)

WorldPacket* const packet = new WorldPacket(CMSG_CAST_SPELL, 1+4+1+4+8);

*packet << uint8(0); // spells cast count;

*packet << spellId;

*packet << uint8(0); // unk_flags

*packet << uint32(target_type);

*packet << m_lootCurrent.WriteAsPacked();

m_bot->GetSession()->QueuePacket(packet); // queue the packet to get around race condition

All these perform the same function on the respective cores, without causing a crash. If the packet data format is wrong you will get a 'ByteBuffer Exception Error' followed by a crash.

2012-01-10 16:48:03 ERROR:SESSION: received not allowed opcode CMSG_LFG_GET_STATUS (0x0296)

2012-01-10 16:48:03 ERROR:SESSION: received not allowed opcode CMSG_LFG_GET_STATUS (0x0296)

Now I am confused. If you're getting these errors, you must be using the (WOTLK) client and not the (TBC) client.

As far as I know, (CMSG_LFG_GET_STATUS - Look For Group status) is not yet handled by the current core. The client periodically sends out this opcode to the server to gather data on available (online) groups for RAID parties. This can be safely ignored and has nothing to do with playerbot.

Looking at your crash dump, it is clear that your crash occurs in a function call to Creature::SetLevitate(bool enable) located in Creature.cpp. There is no reason why this function should ever be called from PlayerbotAI::_HandleCommandSkill(std::string &text, Player &fromPlayer).

The crash dump info looks a bit lean. Are you compiling with 'DEBUG' info included in the code?

Are you running any other mods or addons ? If so, disable them and see if it still crashes.

Do you get the same crash info each time 'skill learn [LINK]' ?

EDIT: Are you playing as a GM. This issue maybe caused by account permissions. If you are, change to 'PLAYER' and see if it still crashes.

I'm no sure whether you can run the mangos daemon under windows, interactively in debug mode. I tend to do my debugging under linux using 'gdb'. This does allow user interaction and gives better crash dump info.

Example Snippet

BACKTRACE FULL

#0 0x084f3642 in std::tr1::_Hashtable<unsigned int, std::pair<unsigned int const, TrainerSpell>, std::allocator<std::pair<unsigned int const, TrainerSpell> >, std::_Select1st<std::pair<unsigned int const, TrainerSpell> >, std::equal_to<unsigned int>, std::tr1::hash<unsigned int>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::find (this=0x0, __k=@0xacfd4624) at /usr/include/c++/4.5/tr1/hashtable.h:711

__code = 348

__n = 1

__p = 0xa768b1c8

#1 0x084e8223 in TrainerSpellData::Find (this=0x0, spell_id=348)

at /home/mangos/wow/one/source/portal/src/game/Creature.cpp:57

itr = {<std::tr1::__detail::_Hashtable_iterator_base<std::pair<unsigned int const, TrainerSpell>, false>> = {_M_cur_node = 0xacfd4dd8, _M_cur_bucket = 0xb350d370}, <No data fields>}

#2 0x08616c9b in PlayerbotAI::HandleCommand (this=0xb350d300, text=

"skill learn |cff71d5ff|Hspell:348|h[immolate]|h|r", fromPlayer=...)

at /home/mangos/wow/one/source/portal/src/game/playerbot/PlayerbotAI.cpp:6051

spellId = 348

pSpellInfo = 0xacfd4ec8

gold = 2902282364

trainer_spell = 0x84f2d70

cost = 143301575

silver = 3081052148

it = 348

totalSpellLearnt = 0

visuals = true

gold = 2795479792

silver = 2795470848

totalCost = 0

unit = 0xb3489180

tSpells = 0xad694494

creature = 0xb3489180

cSpells = 0x0

fDiscountMod = 0.949999988

rank = {0, 75, 150, 225, 300, 375, 450, 525}

msg = {<std::basic_ostream<char, std::char_traits<char> >> = {

<std::basic_ios<char, std::char_traits<char> >> = {<std::ios_base> = {

This particular crash occured because a NULL pointer was passed to TrainerSpellData::Find (this=0x0, spell_id=348)

with the patch I'm debugging at present.

You could try scattering debug flags in the code where you might think the problems lies.

DEBUG_LOG("loc:InitEntry - SetLevitate");

With the error your getting I would place flags in locations where SetLevitate is called from.

i.e. (in Creature.cpp)

/**

* change the entry of creature until respawn

*/

bool Creature::InitEntry(uint32 Entry, CreatureData const* data /*=NULL*/, GameEventCreatureData const* eventData /*=NULL*/ )

and so forth until you track down the cause. It's often caused by unexpected values been passed as pointers or parameters. This can be a long process, but resolving issues in the code can bring alot of personal satisfaction ;)

@hurrensohn That's great! welcome aboard..

Hope this helps

Link to comment
Share on other sites

Hello kennumen:

Here's my system info:

OS: Vista x64 SP2

IDE: VS2010 SP1

mangos: portal[new-ai]

db: UDB 0.12.2.403

I'm really curious about how you manage to debug it with break points in VS2010. When I'm trying to start debug, it always tells me something previously built is outdated, and when rebuilding is done, it tells me 'game.lib' can't be opened. The starting project in the solution is 'game', so I suppose when I start debugging the 'mangosd.exe' should run, am I right? or are there configs of debug I missed? I really wish I could find precisely where the problem is directly in VS, because looking at logs is way too difficult.

Looking at your crash dump, it is clear that your crash occurs in a function call to Creature::SetLevitate(bool enable) located in Creature.cpp. There is no reason why this function should ever be called from PlayerbotAI::_HandleCommandSkill(std::string &text, Player &fromPlayer).

Exactly. The call stack in the log is quite confusing. I searched the entire call hierarchy of PlayerbotAI::_HandleCommandSkill for Creature::SetLevitate, it in fact doesn't exist there. That's why I want to be able to debug it in runtime to see which line of code causes it.

BTW, what I'm testing is your latest portal[new-ai], absolutely clean and I haven't changed a single line.

Edit: Account's gmlevel seems irrelevant to this issue, I changed it to 0 and the server still crashed.

Link to comment
Share on other sites

Hi Syenet,

Thanks for the info. The idea about account permissions was just something to try and can now be eliminated. I only wish I could reporoduce the issue myself. You haven't got an old 32bit box available with XP. If so, it might be a good idea to eliminate hardware incompatiblity in the code. I believe kennumen has a similiar 64bit system and also gets this issue.

EDIT: You could try temporarily commenting out the few calls the SetLevitate(bool) and see if it still crashes on your system.

Creature.cpp: SetLevitate(CanFly());

Creature.cpp: SetLevitate(true);

Creature.cpp:void Creature::SetLevitate(bool enable)

Creature.h: void SetLevitate(bool enable);

Cheers

Link to comment
Share on other sites

My Last Post was on Page 20 or so about choosing the rotation while getting the chosen talentspecs via known spells..

Here is what I have done:

This mage is, of cause a DD, and chooses is using a simple rotation with quite good DPS at lvl 80.

Of course there could be adjusted a lot, but currently I'm a bit out of time :/

Public paste!

PlayerbotMageAI.cpp: http://pastebin.com/KweiHZ2z

PlayerbotMageAI.h: http://pastebin.com/YTWPmDXY

I hope I have more time in the next view weeks to check the warrior against other levels.

Link to comment
Share on other sites

Hi Mookjin,

I did start to test your previous addition, but I have been distracted by the playerbot patch for MaNGOS One. On the good side the AI files should be transferable between the cores and this will encourage a wider user base to test the code. Hopefully I should be finshed soon, so I can help test too.

Cheers

Link to comment
Share on other sites

mookjin I saw the red line about the frost mage pve rotation...

well here it is

1. Frostbolt spam (until finger of frost procs)

- continue with one more frostbolt and follow it with deepfreeze

- cast frostbolt and follow it with Ice Lance

2. If u have deepfreeze cd - Frostbolt spam (until finger of frost procs)

- cast frostbolt and follow it with Ice Lance 2x

3. It is good to use a burst moment what the mage call it

- cast Icy Veins at the beggining of the fight

- recast it whenever it is ready

Human things:

- Think about Cold Snap - it can give u an other icy veins fact that would double your haste time

- some mages use it after first icy veins (which is good cause the fight won't take u longer than 5 min only in special cases)

I suggest to make the mage use cold snap when his icy veins runs out and cast icy veins again.. and check if cold snap cd has finish and make that move again ONLY after he has use an icy veins ..

Cause maybe cold snap will end his cd before icy veins, than it is good for mage to use cold snap ONLY after he use icy veins

Also Mirror immage is the same with icy veins ... use it in the same time with icy veins at the beggining of the fight or whenever the cd is ready

if u need rotation for FF mage arcane mage ... paladin prot/ret/holy let me know...

I also can help u with warlock, hunter, warrior, priest ... about the rest clasees that I didn't enum i have an idea about them and can research for ya if u wanna..

Respect

Link to comment
Share on other sites

about this part

// all non combat actions go here, ex buffs, heals, rezzes

void DoNonCombatActions();

I suggest to make him cast arcane intellect when ooc, molten armor it's used in every spec, and dampen magic or amplify magic depend on target.... cast amplify on tanks it's a fact and dampen on the rest...

one more thing ... one of the glyphs that a frost mage is using is glyph of eternal water...

he must have his water elemental water allways on and target what mage target

he must cast his pet back whenever the cd is ready... I mean he must not use the cold snap to cast water elemental back... he must only check if the elemental cd is ready

Link to comment
Share on other sites

@tyrael:

Thanks for the Info about the frostmage and all other Stuff. :)

Never played a mage in my life!

I will implement it and post it, when finished.

About the otherclasses: Thanks for the Info!

When I finished the warrior and Mage I will work on them and contact you.

Link to comment
Share on other sites

At higher levels, don't Arcane mages benefit more from Mage Armor and Mana Shield together than they do using Molten Armor or Ice Armor?

Molten Armor does increase your crit rating, which helps a lot when lower-level gear does little to improve that, but Mage Armor boosts Mana regen while Mana Shield can absorb a lot of punishment, especially since its short cooldown allows it to be cast very often.

Arcane is a bit different in its workings than the elemental specs, with some unique buffs and debuffs making up for the lack in massive DPS of Fire or survivability of Frost, especially when properly geared and glyphed.

Link to comment
Share on other sites

well mana is not a problem for frost mage.... mana shield doesn't help him at all nor mage armor...which we can say that it might give him some resistances...only on arcane as u pointed UnkleNuke... but it needs to be used with extreme caution cause mana shield use a lot of mana, 2 much mana for wotlk expansion I can say and u will notice that u are oom maybe 2 late in the battle. this is a different discussion... cause mage must get use of his mana gem, also potions to help him a lot.... in general all mages don't use mage armor at all.... based on their arcane rotaion they will probably use evocation one time but that it...boss will be down for sure... that is why mages wish more crit and so use molten armor. And as I will point it a little forward in my reply... with high end gear mages won't get oom.

-- And yes evocation must be used in arcane mage rotation when mage is 40% mana left.

if mookjin, dunno somehow make the mage somehow(I repeat) to think for himself... I mean mage should check his gear and based on it use molten or mage armor... I really can't think at this moment a logic way to do this.

mookjin I forget to tell u about evocation.... make the mage to check his mana and use it when he is low...

now u can look this problem from 2 points... one is the added above when mage get almost oom he must use evocation... and point will be to use it at 40% mana left, as we know evocation fills mage up with 60% of his mana, fact that will get him to full mana.

I personally don't use second point, as it smash your dps for a few seconds... and in wotlk especially at high gear mana is really not a problem at all.

When ooc mage must drink and eat, in combat in my point of view is to use evocation when he is almost oom... in general all bosses from icc for example will die before mage will get oom... but a check and cast for that spell is needed.

Link to comment
Share on other sites

@tyrael:

Thanks for all the input! I will try to implement it as good as possible!

I had more free time this weekend as I thought, so I started coding on the Frost Mage and testing the Warrior and Mage against lower Levels.

A view small adjustments where done and they seem to be reasonable in the lower levels ;)

But with the Frost mage... Hm.. Could it be, that there is no Fingers of Frost Aura is comming up, when the Mage is a bot ?

When playing him normal I had a view proggs of Fingers of Frost.

Got they same feeling about Frostbite or any other freezing Auras...

When I put the Fingers of Frost Aura manually on the target ( .aura 74396 ) he is using its ice lance spell.

Does anybody know where to get the IDs from Frost Aura and other Auras?

I couldn't find anything about it.

Here are the mage sources I tested with, if anybody would like to double check the frost mage for the strange Aura behaviour (or test any other if he would like to):

PlayerbotMageAI.cpp http://pastebin.com/C626yuAG

PlayerbotMageAI.h http://pastebin.com/4nAweZRF

For testing make sure you are using a frost skilled mage, otherwise it should automatically select the Arcan or Fire Mage rotation.

Thanks for your help in advice!

Link to comment
Share on other sites

Thanks for the info. The idea about account permissions was just something to try and can now be eliminated. I only wish I could reporoduce the issue myself. You haven't got an old 32bit box available with XP. If so, it might be a good idea to eliminate hardware incompatiblity in the code. I believe kennumen has a similiar 64bit system and also gets this issue.

Concerning skill learn [skill]:

Server:

OS: Win XP SP3 32bit

IDE: VS2010 SP1

mangos: various (including clean playerbot, new-ai, talentspecs, combination of those with or without latest core + mmaps)

db: UDB 0.12.2.401 / 402

I really should test ytDB for this like I've been meaning to...

I don't actually use breakpoints in mangos (as my compile machine is not my server), but I recall from years ago the directory structure (of the Run/Debug command) is rather funky. Something about putting the data files a folder up from their normal relative location.

Link to comment
Share on other sites

Hi kennumen,

Thanks for clarifying you setup. I was sure you posted a crash dump showing your OS as Vista/2008 with 64bit architecture? I have been testing the new 'portalone' patch for MaNGOS One, with a non ytDB database (I believe it is based upon UDB). So far 'skill learn' has not caused any problems :| but it is early days yet. I do believe there must be something fundamentally different between our systems and a process of elimination of (possible) causes is the only way forward.

Cheers

Link to comment
Share on other sites

Hi Blueboy,

is there a patch for mangos-one yet? I'm not trying to be pushy, I just read that you tested it already.

greetz

hurr

Yes,

Sorry for the delay, I decided to implement a patch that includes all the new features ( except 'talent specs') currently being tested on the 'new-ai' branch for MaNGOS. It has taken alot of work to adjust the commands to work with the old 2.4.3 DB structure, but I'm pleased to say that the code now checks out. I would be grateful if you could provided feedback on the code, and I should be pushing it later this evening.

EDIT@ It's alive ! 8o portalone. I will be updating playerbot wiki shortly to include information on the new code.

Hope this helps

Link to comment
Share on other sites

Hey guys, first, my hats off to ya for the progress made on bots. wow...

ive been away from mangos for about 3 years now.. so im amazed at all the work thats come from the community.

I have the same issue as Kennumen. when I tell a bot (any bot, anywhere) to skill train (*skill link here from shift-click*)

insta lock up of mangos and I have to reboot to kill it (have tried task manager etc no luck)

due to the nature of the crash, I dont get an error code obviously. Ive tried it in numerous locations and it still crashes.

Now, for some stats:

Im on Windows 7 (64bit)

I'm using (for bot server) compiled git.com/playerbot/mangos.git master.

My DB is UDB 11852

Changes ive made include the following sqls to increase herbs/mineral spawns:

update pool_template pt join (select pgo.pool_entry, count(1) zone_total from pool_gameobject pgo join pool_template pt on pgo.pool_entry=pt.entry where pt.description like "MASTER%" or pt.description like "%MASTER" group by pool_entry) tpgo on pt.entry = tpgo.pool_entry set pt.max_limit=ceil(tpgo.zone_total/3);

and

update pool_template pt join (select pp.mother_pool, count(1) pool_total from pool_pool pp join pool_template pt on pp.mother_pool=pt.entry where pt.description like "MASTER%" or pt.description like "%MASTER" group by mother_pool) tpp on pt.entry = tpp.mother_pool set pt.max_limit=ceil(tpp.pool_total/3);

Ive also tweaked the battlegrounds to allow 1 v 1...

other than that I allow any one char to learn all tradeskills..

These changes i made before i got playerbot, and are still working on my other server.

I've not tried anything to see where this crash is coming from yet, wanted to see if there had been any progress on it.

For now, I'm just not using the skill train.

Oops.. i offered specs didnt i... got sidetracked.

windows 7 (fully up to date)

acer aspire .. AMD AthlonII X2 P340 2.2ghz

3gb memory

hrm.. hope thats enough. its late, im tired, will check back later.

p.s. If I get time to work on any of this myself, I'll be glad to toss it up.

Link to comment
Share on other sites

Hey,

You know what guys.This issue is a real problem and it appears that all who experience it also use UDB database. kennumen has suggested that this might be the possible cause. I use ytDB myself for MaNGOS (two) and have not once experienced a crash. I'm going to try UDB and see if I get the same.

@Gitch Thanks for the info, all help is appreciated ;) You might want to try the code being tested on the 'new-ai' branch, I see from 'skill train' that your using older code. The skill command has now seen improved.

EDIT@ O.K I have some good news and some bad news.

Good News: After running with the current UDB database I get the same crash as the rest of you :/

Bad News: My fault :8

There is quite a difference between UDB and ytDB. The code I wrote worked fine for ytDB but not for UDB data. It was a combination of bad logic and a poor use of variable names that leads to the crash (The crash occurs due to a NULL pointer being used to obtain trainer data). I am currently working on a patch and I will upload it shortly.

Cheers

Link to comment
Share on other sites

@blueboy, I was tired.. the command in my version is 'skill learn' not 'skill train'. I may still try the new-ai branch of code. thanks for the heads up.

Also, Update on the crash issue: I tried 'skill learn' with my GM acct, and instead of crashing.. mangos simply stopped...working.. yeah i know that sounds silly, but let me explain: mangos in appearance was fine, except it no longer showed any updates, while nothing happened in the client. When i closed my clients down, the mangos screen gave a message.. I thought how wierd that its locked up and still acknowledging the client leaving... so I tried logging back in.. well.. authenticated successfully, and mangos screen acknowledged the client login, but, client wouldnt go further than the realm select screen. I couldnt type anything in the mangos console window, but it wasnt frozen so to speak... I clicked on the red x, and away it went. so this was much different than when I do it on my normal account.. also, on my normal acct, i can add bots with the .bot add cmd but not with the menu now, the menu doesnt show up after the first 'skill learn' crash.

Anyway, heres what little info I can provide about before, during and after that last crash (on GM account)

Just before crash:

WORLD: SMSG_UI_TIME

WORLD: Time Lag/Synchronization Resent/Update

CMSG_TIME_SYNC_RESP

Time sync received: counter 26, client ticks 595897, time since last sync 10021

Our ticks: 596147, diff 250, latency 1

CMSG_TIME_SYNC_RESP

Time sync received: counter 19, client ticks 596756, time since last sync 10055

Our ticks: 596806, diff 50, latency 2

CMSG_TIME_SYNC_RESP

Time sync received: counter 27, client ticks 605921, time since last sync 10024

Our ticks: 606171, diff 250, latency 1

CMSG_TIME_SYNC_RESP

Time sync received: counter 20, client ticks 606747, time since last sync 9991

Our ticks: 606800, diff 53, latency 3

CHAT: packet received. type 7, lang 1

That last bit of text in red would be the last chat sent to me bot that the server acknowledged (I think, perhaps not the cause, but the one prior to it)

During the crash(non-functioning mangos):

WorldSocket::handle_input: Peer has closed connection

WorldSocket::handle_input: Peer has closed connection

I logged both accounts out after the server stopped responding

Next, is the list of text when I tried to log right back in:

WorldSocket::HandleAuthSession: client build 12340, account 88888888, clientsee

d E0A3607A

[2 ms] SQL: SELECT id, gmlevel, sessionkey, last_ip, locked, v, s, expansion, mu

tetime, locale FROM account WHERE username = '8888888'

WorldSocket::HandleAuthSession: (s,v) check s: BD37F6DDFDD2F2E7209BE1537BE5B3A91

50C9BF7FE570790F627BB6F98DD2B09 v: 31C3850A0DD2333F676B707E040EC7B987BFA8648DEBA

62B695D853148C510C8

[1 ms] SQL: SELECT 1 FROM account_banned WHERE id = 5 AND active = 1 AND (unband

ate > UNIX_TIMESTAMP() OR unbandate = bandate)UNION SELECT 1 FROM ip_banned WHER

E (unbandate = bandate OR unbandate > UNIX_TIMESTAMP()) AND ip = '127.0.0.1'

WorldSocket::HandleAuthSession: Client '88888888' authenticated successfully fr

om 127.0.0.1.

[1 ms] SQL: SELECT type, time, data FROM account_data WHERE account='5'

[1 ms] SQL: SELECT tut0,tut1,tut2,tut3,tut4,tut5,tut6,tut7 FROM character_tutori

al WHERE account = '5'

ADDON: Name: Blizzard_AchievementUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x

0

ADDON: Name: Blizzard_ArenaUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_AuctionUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_BarbershopUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_BattlefieldMinimap, Enabled: 0x1, CRC: 0x4c1c776d, Unknown

2: 0x0

ADDON: Name: Blizzard_BindingUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_Calendar, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_CombatLog, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_CombatText, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_DebugTools, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_GMChatUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_GMSurveyUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_GlyphUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_GuildBankUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_InspectUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_ItemSocketingUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2:

0x0

ADDON: Name: Blizzard_MacroUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_RaidUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_TalentUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_TimeManager, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_TokenUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_TradeSkillUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

ADDON: Name: Blizzard_TrainerUI, Enabled: 0x1, CRC: 0x4c1c776d, Unknown2: 0x0

EDIT: hrm, I just checked my dberrors.txt from the bot server directory, and found an error that doesnt appear on my other server. the only diff in the servers is playerbot code. (unless I've done something stupid when I wasn't watching myself.. sometimes self can get into trouble):

2012-01-21 00:54:44 Spell (id: 33824) have SPELL_EFFECT_QUEST_COMPLETE for quest 10162 , but quest does not have SpecialFlags QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT (2) set. Quest SpecialFlags should be corrected to enable this objective.

I'm so rusty and the DB structure has changed so much its alien to me now lol, so im trying to figure it all out again. Off to see if I can figure out where this error come from.

Thought something might catch yer eye, dunno. Anyway, I'll dig a bit deeper later today, wanted to toss that info up.

cheers.

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