Zone Crash - If someone could test this
Someone with newer source, if you could test this for me. I am thinking it will also be a crash in the latest source, no changes in this section. This is how to repeat the crash, at least for me.
Go to Sirens Grotto and use Call of Karana on either a Seahorse or Swordfish. Send the pet to attack a few creatures. While they are attacking run back up to dry land, anywhere will do. Let the pet eventually die. Exactly when the pet dies I get a zone crash at what would be line 1037 on the latest souce in mob_ai.cpp Code:
if (target->IsCorpse()) |
I can't test it atm..but, you could try this as a fix:
Code:
zone/mob_ai.cpp | 3 +++ EDIT: That's just above where you posted from :) It's possible for the ai target timer to not be ready in the 'else' clause from above and the code will flow through with the last target.. ..which, if already destroyed, will cause an exception error when you try to dereference the pointer - testing for target->IsCorpse() |
Added this above did fix it.
Code:
if (target && !hate_list.IsEntOnHateList(target)) Either way I am very appreciative it is fixed but I would really like to know more about what the cause was. If I am going to continue to learn the source I have to dig my heels in. |
Yeah, this is not the source of the issue...
It can probably happen with any mob at any time when it's using the Mob::AI_Process()..but, you found a way to reliably trigger it. Basically, any time a mob is removed from another mob's hate_list, we really need to test that mob's current target against what was removed. Most reasons wouldn't crash a server..but, would cause erratic behavior between affected mobs. Gimme a few and I'll see what I can do to fix it more permanently.. |
I looked it over again and finally figured out what you were saying.
Quote:
if(AItarget_check_timer->Check()) May would fail and fall through that if statement. Just curious, what about making that if statement into an if/else and making the target null in that else statement? |
Oh, you don't want to make it null..I suspect there would be a lot of 'pauses' in-game if mobs didn't have targets during their 'off-time' :P
|
It 'looks' that the condition I would have added is already accounted for..
Code:
bool Mob::RemoveFromHateList(Mob* mob) I guess I'll have to check for direct manipulations of 'Mob::hate_list' to see if a GetTarget() check is made in those cases... |
Okay let me know what needs to be done on this. I definitely do not want to forget that it is just a temporary fix.
|
I may push that as a 'temporary' fix at some point..I just hate the idea of iterating that list on every pass through there, though...
|
Let me know if you do a permanent fix. Can you reply back to this post if you do?
I supposed I could instead catch it in the death event for a charmed mob. |
All times are GMT -4. The time now is 06:38 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.