2/05 code - bots crash zone on death
Updated my test server to the 02/05 RoF2 code. Fixed the SQL issues and view table issue, but now the bots crash the zone on death.
|
Bots have always had issues, would you mind posting the crash logs if you have any?
|
edit: fixing logging and will post
The bot dies, it's removed from the group, and the zone crashes. When the bot is respawned after you log back in, it spawns at 20%, so it is logging that it died. |
[02-06-2015 :: 21:54:58] [Crash] f:\dd\vctools\crt_bld\SELF_X86\crt\src\INTEL\strle n.asm (69): strlen
[02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\mob.cpp (2856): Mob::GetCleanName [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\bot.cpp (5918): Bot::Death [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\attack.cpp (3588): Mob::CommonDamage [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\bot.cpp (6004): Bot::Damage [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\spell_effects.cpp (281): Mob::SpellEffect [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\bot.cpp (9075): Bot::SpellEffect [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\spells.cpp (3734): Mob::SpellOnTarget [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\effects.cpp (911): EntityList::AESpell [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\beacon.cpp (99): Beacon::Process [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\entity.cpp (526): EntityList::BeaconProcess [02-06-2015 :: 21:54:58] [Crash] g:\eq2\source\zone\net.cpp (427): main [02-06-2015 :: 21:54:58] [Crash] f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (241): __tmainCRTStartup |
Well, it's something in this section of bot.cpp causing it to crash. I removed it and it's not crashing anymore.
Code:
Group *g = GetGroup(); |
They also crash the zone when disbanded, but not when you use #bot camp.
So, not that I can fix it after trying for two days, but it's something to do with the group code when you disband. Bots are crashing the zone when they are disbanded if it would disband the group - if it is just you and the bot in the group. The zone does not crash if you disband a bot and have a merc or someone else in the group. |
Heres a hack to get around the crashing at dismiss of bot, also this will now dismiss single bots if you are grouped with more than one via the "disband" button, which hasnt been working for a while, although this is a bit hacky and a more permanent fix is still needed. (also introduces a new bug based on group leadership)
in client_packet.cpp in function: void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app) at about line 6463 where the #ifdef Bots, replace the #ifdef bots with this section Code:
#ifdef BOTS strcpy(g->membername[j-1], g->members[j]->GetCleanName()); Im still working through breakpoints and narrowing down a temp fix at least. |
That fixed it!
Thank you so much, I suck at c++ and spent like 15 hours getting nowhere trying everything I could. My servers been crashing off and on all day due to this, going to patch it tomorrow morning. edit: I see what you mean about a group leadership bug. It can cause people to have bots get stuck in the group. Looks like deleting the info out of group_id and group_leaders resolves it, so going to see if I can add a delete query for those tables as part of it. |
A side effect is this sometimes causes a bot that was disbanded to rejoin after zoning, even if two other bots are out, and the bot restriction is set to 2 bots.
|
Well, been trying to isolate exactly why memory in g->membername is being corrupted, causing groupcount to assume you have a six person group, but its slow going, have stepped through the code many times now but cant pin it down.
For now, you could put a check in place to clean up the corrupted memory and allow the rest of the function to proceed as normal, but again, we need to find out why the memory is being written with garbage during this process. bot.cpp bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillUseTypes attack_skill) { about line 5909 if you have no custom code, such as the bot melee fix, ect. Code:
// delete from group data Code:
// delete from group data I'll keep plugging away as time permits, but seems only you and me are seeing this issue which seems odd? |
nevermind
/10char |
I think were probably the only two people on the new code using bots - it seems most people with bots are still on older code, so Im guessing that's why.
Im going to try your code after I patch Imperium tomorrow and Ill let you know what feedback I get later this week. Glad youre working on it, its beyond my ability to fix. |
If you're fixing bots, submit pull requests on Github :)
|
Still crashing on some types of group disbands, trying to figure out what else.
|
Last bot crash issue is if you disband a bot from the group using the above fixes, then do a #bot camp on it after it's out of your group, the zone crashes.
|
All times are GMT -4. The time now is 12:59 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.