This thread is the result of this crash:
http://wiki.eqemulator.org/i?M=Pastebin&Paste=ftJoFBpe
Plain and simple..I believe the cause is related to an early access of a Client property before it has been initialized.
The failure (most likely an 'Access Violation' error):
Code:
if(this->aa) {
for (i = 0; i < MAX_PP_AA_ARRAY; i++) { //iterate through all of the client's AAs
if (this->aa[i]) { // make sure aa exists or we'll crash zone
aa_AA = this->aa[i]->AA; //same as aaid from the aa_effects table
aa_value = this->aa[i]->value; //how many points in it
if (aa_AA > 0 || aa_value > 0) { //do we have the AA? if 1 of the 2 is set, we can assume we do
//slots = database.GetTotalAALevels(aa_AA); //find out how many effects from aa_effects table
slots = zone->GetTotalAALevels(aa_AA); //find out how many effects from aa_effects, which is loaded into memory
if (slots > 0) //and does it have any effects? may be able to put this above, not sure if it runs on each iteration
ApplyAABonuses(aa_AA, slots, newbon); //add the bonuses
}
}
}
}
The crash occurs on access to the structure pointer in the array.
This array ('aa') has not been assigned when this code tries to access the pointer. This only appears to occur when an AE spell goes off
in the vicinty of a client that has not 'FinishedLoading' (i.e., someone who has made contact with the zone server..but, not yet in-game.)
There may be some other occurrences where this happens..but, I did attempt a fix for this and am awaiting feedback.
If this does indeed fix the issue, we will probably need to address all of the entity list AE functions.
This entire check is the fix..I had to change the method checked in this commit due to a misunderstanding of the connection vs. client load state
naming conventions... (client load state = 'conn_state'; connection state = 'client_state' - go figure...)
https://github.com/EQEmu/Server/comm...4004a0ecd31801