Jump to content

Syenet

Members
  • Posts

    32
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Syenet

  1. 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.

  2. 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?

  3. 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.

  4. Hello blueboy:

    It's been a year since I came here last time, and very glad to see the efforts and progress all you guys have made, especially about the ai part.

    I see the branches changed, are the new ai scripts merged into 'master' or only stored in 'new-ai'? cause I checked the last-2-month updates committed of each branch and found them almost the same. Besides, I tested 'playerbot/mangos', the most stable one, commands like 'report', 'orders' don't work, neither do some shortcuts like 's', 'skill l'.

    Is there any place where I can get what you're currently working on? I take a glance at 'bot_todo.txt', it seems outdated. I think you can make a list of both accomplished and upcoming features on the very 1st post of this thread, also suggest you open another thread to seperate discussions about basic functions from those about PvE/PvP ai scripts.

    Thanks for the brilliant work, wish I could help.

    Edit: Sorry, I see the changes ahead of 'master' in 'new-ai', I'll check the code.

  5. mangos: mangos-mangos-v0.16-1810-ga9a9715.zip (from github)

    SD2: scriptdev2-scriptdev2-1d33dfd (from github)

    UDB: 0.12.2.403 (from svn 402Full->403Core->403UpdatePack)

    Compiler: VS2010 SP1

    System: Windows Vista x64

    Carefully proceed according to the installation guide, but when I try to run mangosd.exe, it crashed instantly. Here's the DBErrors.log:

    SQL: SELECT required_11852_01_mangos_gossip_menu FROM db_version LIMIT 1

    query ERROR: Table 'realmd.db_version' doesn't exist

    SQL: SELECT * FROM db_version LIMIT 1

    query ERROR: Table 'realmd.db_version' doesn't exist

    The table `db_version` in your [WORLD] database is missing or corrupt.

    MaNGOS cannot find the version info needed to check that the db is up to date.

    This revision of mangos requires a database updated to:

    `11852_01_mangos_gossip_menu.sql`

    Post this error to your database provider forum or find a solution there.

    Having searched the entire google with no useful info, I'm really confused about it. I've setup my server quite a few times before, often came out errors due to outdated db with explicit explainations in the log files, and I never came across such issue. The table's name should be "realmd_db_version" instead of the one displayed above. What on earth happened? Please help me.

  6. Hello LordPsyan

    Thanks for your suggestion, I'm using git to fetch updates from remotes and merge them into my mangos. I've never asked anyone to push commits for me, what I'm doing here is reporting bugs and providing my concerns, I'm learning the code and I wish I could help.

    blueboy is real kind, he always gives me examples and explainations even if I bring up my minimum doubts, and I never ask him to do that much, I really appreciate it.

    The reason I submit posts here is that I think it may be playerbot issues, and probably it may be not, I'm not sure, after all I'm not professional. If any of my behaviors makes anyone feel uncomfortable, I'm sorry for that. I don't know it's annoying and this is what I can help with at this stage.

    To blueboy:

    I think the boss issue is because of sd2, while the bots keep attaking, they strangely don't have a target, or say it they have an invisible target. I noticed that some npc or creatures are unselectable under certain circumstances, maybe this is the reason.

  7. I have seen that post and I'll try /reload next time. In my case, pet's name is normal.

    I almost forgot to tell you, if 'Unknown' issue occurs, the social panel of client is totally crashed. All tabs will be displayed as the 1st tab 'friendlist'. (I can switch to other tabs but the panel keeps displaying the 1st tab). Is it related to cache as well?

  8. I do not believe you can safely change the format of a raid group, while inside the instance.

    Yes, but I have no choice but to leave the instance and reform the group. I said I can entirely close the client to resolve the 'Unknown' issue, but I want to find another more convenient way to fix it, and try to find out the reason to fix it in the code. So I tried reforming the group, but always fatality. Since you questioned, I also think it might be a cache issue, so I'm not sure if it's fixable in your code.

  9. hello blueboy, here is the detail:

    I've been testing the sd2 raid scripts recently, and I add 9 bots of each class, so we make up a 10-player raid group. I notice that sometimes bots will keep attacking the boss or mobs even if it's dead, I think it might be errors of sd2 scripts. Well this bug includes two different types:

    1. Bots will keep the attacking pose (casting, aiming)after the target is down.

    This one occurs real OFTEN in any scenario and I guess it's because there might be no "cancel" command for bots so they just can't stop their last action. I see that sometimes bots are able to finish the casting, like casting frostbolt against the corpse of DEAD target, well this maybe what it's supposed to be, but unfortunately this errors still occurs now and then. Honestly this one isn't that annoying cause bots can still follow your command, and this one could be fixed when bots begin to attack the next target(I don't know why, but it truly can be fixed automatically). The only thing makes me feel uncomfortable is that occasionally the casting SOUND is being repeated over and over, and the VOLUME is real high. To make it quiet, I simply logoff and relogin, this trick works perfectly.

    2. Bots will be attacking the boss(in an instance), AFTER it's down and looted, LIKE CRAZY.

    OMG I don't know why bots hate the boss that much, they just really enjoy torturing the corpse. They won't follow my command, and to continue the raid, I have to get out of the instance and reenter it. I think this error may have nothing to do with your code, it's more likely to be sd2 error(not sure).

    So, when the 1st error occurs, I play the logoffin trick to resolve it. Well, this sound good, but SOMETIMES(I really don't like this word cause it makes me unable to confirm the reason), when I log back in the server, MY NAME AND MY PARTY MEMBERS' NAMES APPEAR TO BE UNKNOWN, look, I mean the member of my team, not everyone of the raid group. If I'm in team1, then every member of team1 encounters this error, including myself, but team2 remains the same as normal. Actually each member of team1 is existing in the world but 'Unknown' makes the server unable to find them, so any command that covers the name of team1 member will not work.(such as 'co' commands).

    This time I come up with the idea of quiting and reforming the raid group. Instead of solving this issue, this solution SOMETIMES happens to kill the 'mangosd.exe'. There're several crash dumps of this error, and some parts of these dumps are the same, so I posted these parts above. If you'd like to see the entire file, I'd better upload it somewhere for you. BTW these files are almost the same.

    I know 'SOMETIMES' is the most annoying crap, and I will try to figure out how to reappear this error and find the direct reason.

    I'm using your latest 'portal/training' merged with 'cyberium/new_ahbot'. The merging is done by your helping me resolve the conflicts. But I disable the ahbot everytime I fire up the server, so i'm sure ahbot has nothing to do with this issue.

  10. If I log off in a raid instance, me and my party members' names will appear to be "Unknown" when I log back in. And if I quit the raid group, the server may crash sometimes.

    this is the crash info:

    Call stack:
    Address   Frame     Function      SourceFile
    004FD8E6  00000000  std::_Tree<std::_Tset_traits<Player *,std::less<Player *>,std::allocator<Player *>,0> >::_Eqrange+6
    004FFEBA  00000000  Group::RemoveInvite+1A
    00536EE3  00000000  Player::UninviteFromGroup+13
    0060E791  00000000  WorldSession::LogoutPlayer+791
    007B754C  00000000  WorldSession::HandleLogoutRequestOpcode+1EC
    0060A5D1  00000000  WorldSession::ExecuteOpcode+21
    0060EDBD  00000000  WorldSession::Update+BD
    004851B8  00000000  World::UpdateSessions+98
    0048798C  00000000  World::Update+1AC
    00457662  00000000  WorldRunnable::run+52
    00465EE0  00000000  ACE_Based::Thread::ThreadTask+10
    67BE7064  00000000  ACE_OS_Thread_Adapter::invoke+74
    6B40C6DE  00000000  _endthreadex+3A
    6B40C788  00000000  _endthreadex+E4
    7692ECCB  00000000  BaseThreadInitThunk+E
    772FD24D  00000000  RtlCreateUserProcess+8C
    772FD45F  00000000  RtlCreateProcessParameters+4E
    ========================
    Local Variables And Parameters
    
    Call stack:
    Address   Frame     Function      SourceFile
    004FD8E6  00000000  std::_Tree<std::_Tset_traits<Player *,std::less<Player *>,std::allocator<Player *>,0> >::_Eqrange+6
       Local  <user defined> '_Keyval'
    
    004FFEBA  00000000  Group::RemoveInvite+1A
       Local  <user defined> 'player'
    
    00536EE3  00000000  Player::UninviteFromGroup+13
    
    0060E791  00000000  WorldSession::LogoutPlayer+791
    punting on symbol Save
       Local  <user defined> 'data'
       Local  <user defined> 'aset'
       Local  <user defined> 'itr'
       Local  <user defined> 'guild'
    
    007B754C  00000000  WorldSession::HandleLogoutRequestOpcode+1EC
       Local  <user defined> '__formal'
       Local  <user defined> 'data'
       Local  <user defined> 'data'
       Local  <user defined> 'data'
    
    0060A5D1  00000000  WorldSession::ExecuteOpcode+21
       Local  <user defined> 'opHandle'
       Local  <user defined> 'packet'
    
    0060EDBD  00000000  WorldSession::Update+BD
    punting on symbol diff
       Local  <user defined> 'updater'
       Local  <user defined> 'packet'
       Local  <user defined> 'itr'
       Local  <user defined> 'pBotWorldSession'
       Local  <user defined> 'packet'
    
    004851B8  00000000  World::UpdateSessions+98
    punting on symbol diff
       Local  <user defined> 'sess'
       Local  <user defined> 'next'
       Local  <user defined> 'updater'
    
    0048798C  00000000  World::Update+1AC
    punting on symbol diff
    punting on symbol maxClientsNum
    
    00457662  00000000  WorldRunnable::run+52
    
    00465EE0  00000000  ACE_Based::Thread::ThreadTask+10
    punting on symbol param
    
    67BE7064  00000000  ACE_OS_Thread_Adapter::invoke+74
    punting on symbol status
    
    6B40C6DE  00000000  _endthreadex+3A
    
    6B40C788  00000000  _endthreadex+E4
    
    7692ECCB  00000000  BaseThreadInitThunk+E
    
    772FD24D  00000000  RtlCreateUserProcess+8C
    
    772FD45F  00000000  RtlCreateProcessParameters+4E
    
    ========================
    Global Variables

    I can resolve the "Unknown" issue by completely eliminating the "wow.exe", but I don't know what's causing this, it is sort of annoying.

  11. Yes, action queue, priority, event handling...this structure is much better than the original version which runs the whole iteration again and again, and this is exactly what we need to improve AI to a new level. I'll try it out and see the detail of those features, terrific work dude!

  12. The server crashes everytime after it's set up, to be specific, everytime after a line of SQL query shows up in "mangosd.exe".

    That SQL query seems about reading character infos from db where guid = 0, then I try disabling ahbot, then the server is fine.

    So your "ahbot" is the version that requires an existing character to be the "AuctionHouseBot" right? And I need to specify the account and guid of this character in "mangosd.conf".

    I remember there's version of ahbot which doesn't need a character, maybe new_ahbot. Which version is the latest and stable?

    I create a patch from branch "new_ahbot" of "..cyberium/mangos.git", when I'm trying to apply it to branch "master" of "..blueboy/portal.git", I get these errors:

    error: patch failed: configure.ac:363
    error: patch failed: src/game/Makefile.am:17
    error: patch failed: src/game/World.cpp:1329
    error: patch failed: win/VC100/game.vcxproj.filters:448

    I think these are small problems but I don't know how to fix.

  13. When I was trying to make a patch, I got these errors:

    grep:  invalid option -- m
    Usage: grep [OPTION]... PATTERN [FILE]...
    Try `grep --help' for more information.

    I find this:

    Maybe the bash shell that your running the script in does not support this '-m' option for grep.
    you can add a patch by using this command : patch -p1 < nameofpatch.patch

    but you can do it with svn as well

    Is it the proper solution to this problem? or there's a better one?

  14. Sorry I'm a little bit confused.

    1. The first thing is to merge two branches with "portal", when merging is done, the source file should be already changed, right?

    2. After handling the conflicts the solution should be compiled without issues.

    3. Now everything is ready, then you commit changes. Here I wonder, since the code is already changed, it should be compiled now, why you commit changes here? Are you commiting the changes of resolving conflicts? for the purpose of making patches?

    4. After commiting, you create a patch. Ok, this is what confuses me the most: right now the code is ready to go, what is this patch used for?

    5. You apply this patch. If patch is made for changing code, why are you applying it to the code that is already changed?

  15. Please bear in mind that these sub-branches hold alpha code and although it might compile, it may just be an idea in progress (i.e not guaranteed to work).

    Yes, I know that. It's weird to me just because the "collect" part once worked perfectly.

    I see there's a "ahbot" branch in your "portal", is it the "new_ahbot" form cyberium http://github.com/cyberium/mangos/tree/new_ahbot?

    If I want to merge "ahbot" to my current "training" which is already merged with "loot_bt", how can I do that?

  16. well stormwind is a gameobject actually

    Yes, but right in front of me there was a peacebloom and command "survey" didn't return its link.

    Today I test bots' gathering at another place, this time I get the game objects, but when I order bots to "get", sometimes they just get in position and stand still, and if this occurs, command "get" won't be effective untill next time you login.

    quest item like "a bundle of woods" can't be picked up. The "survey" and "get" code may be modified when merging two branches, but I don't know if this matters.

  17. blueboy, Thanks for the guide. I just merged two branches by violence last night, I mean I've been manually modifying each line of changes according to https://github.com/blueboy/portal/compare/training...loot-fix-bt.

    And after fixing several compiling errors(exactly the same with conflicts you mentioned), the solution was successfully built.

    But there's still something wrong with the "looting" part, bots can't skin hide from corpse, and another big problem is that when I'm using "survey" command, bots return only the namelist of nearby areas(Stormwind City, Northshine Abbey...), not the list of game objects. This leads to the inability to order bots to gathering mine, collecting herbs or whatever behavior requires interaction with game objects.

  18. you deleted the "training" branch and recreate it, I cant see any recent "training" commit of yours on github. Right now I find that things are different from before, bots don't pick up money anymore, and materials for their professions as well. I do remember they once picked up everything useful, including cloth for first aid and meat for cooking. And bots don't loot from dead corpse, I tried "get" command with the target corpse selected, and then I got no reaction from bots. I don't know if it's because no necessary quests item left for them to loot or they simply don't loot a second time, or ...I forget the correct command of "get".

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