You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did find a way to reliably reproduce these crashes..I chose 'firiona' due to there being opposing factions and I knew there would be some npc-on-npc action.
Basically, at the #zone-in point, doing a '#invul on -> #aggrozone -> -> #zoneshutdown firiona' will cause any of a series of crashes.
(I actually tried some hit-and-miss stuff in the beginning and found that I had two bug paths..A->B->D and A->C->D. regardless of the order, I still arrived at the same end point.)
I wasn't comfortable with the fact the hate was changing during zone shutdown, so I added code to the beginning of Zone::ShutDown() to turn off mob ai and to clear its aggro... (Later I found that a Wipe() is called in Mob::AI_Stop(), so I removed that.)
This led to a number of crashes going away..but, new ones crept in. (I also added a missing ';' in Mob::AI_Stop() and that appeared to have helped as well.)
(At this point, I had to define 'Zone::IsLoaded() { return ZoneLoaded;}' to get the next portion to work. I'm uncomfortable with using this since it's file scope..and I don't understand its use between instances..but, it does work in a test environment.)
My next crash was in '..\zone\quest_parser_collection.cpp:QuestParserCollection::GetQIByPlayerQuest(std::string &filename)'
The first line of code here is to check 'if(!zone)' and return nullptr.
the problem is that zone is defined..but, in a closing state. I added '|| !zone->IsLoaded()' because ShutDown() has just set 'ZoneLoaded' to false.
This is where non-apparent zone shut-down crashes are occurring. The are being processed after the shut down call thread is processed and are, likely, processed timers.
This fixed the 'GetQIByPlayerQuest' crash..but, still others were creeping in. So, I did a grepwin search for '(!zone' and found 8 more occurences and fixed those. (I have since gone back and found a lot of inclusion checks (i.e., 'if(zone)') that will probably need to be addressed similarly..weather check is one...)
I was still getting the occasional hate crash..so, I went into Mob::AI_Stop() and 'safe_deleted' the 3 pathing timers and 'Disabled()' ALL hard-coded timers and iterated SpecialAbilities[] to disable those as well.
There are a lot of random crash reports..but, not a lot of references that point to the cause...
Here is one from 2009: http://www.eqemulator.org/forums/showthread.php?t=37449&highlight=zone+crash+dump
And, of course, (one of) Akkadius's EZ server crash lists: http://wiki.eqemulator.org/i?M=Pastebin&Paste=d5sv9C8A (expires)
I did find a way to reliably reproduce these crashes..I chose 'firiona' due to there being opposing factions and I knew there would be some npc-on-npc action.
Basically, at the #zone-in point, doing a '#invul on -> #aggrozone -> -> #zoneshutdown firiona' will cause any of a series of crashes.
(I actually tried some hit-and-miss stuff in the beginning and found that I had two bug paths..A->B->D and A->C->D. regardless of the order, I still arrived at the same end point.)
I wasn't comfortable with the fact the hate was changing during zone shutdown, so I added code to the beginning of Zone::ShutDown() to turn off mob ai and to clear its aggro... (Later I found that a Wipe() is called in Mob::AI_Stop(), so I removed that.)
This led to a number of crashes going away..but, new ones crept in. (I also added a missing ';' in Mob::AI_Stop() and that appeared to have helped as well.)
(At this point, I had to define 'Zone::IsLoaded() { return ZoneLoaded;}' to get the next portion to work. I'm uncomfortable with using this since it's file scope..and I don't understand its use between instances..but, it does work in a test environment.)
My next crash was in '..\zone\quest_parser_collection.cpp:QuestParserCollection::GetQIByPlayerQuest(std::string &filename)'
The first line of code here is to check 'if(!zone)' and return nullptr.
the problem is that zone is defined..but, in a closing state. I added '|| !zone->IsLoaded()' because ShutDown() has just set 'ZoneLoaded' to false.
This is where non-apparent zone shut-down crashes are occurring. The are being processed after the shut down call thread is processed and are, likely, processed timers.
This fixed the 'GetQIByPlayerQuest' crash..but, still others were creeping in. So, I did a grepwin search for '(!zone' and found 8 more occurences and fixed those. (I have since gone back and found a lot of inclusion checks (i.e., 'if(zone)') that will probably need to be addressed similarly..weather check is one...)
I was still getting the occasional hate crash..so, I went into Mob::AI_Stop() and 'safe_deleted' the 3 pathing timers and 'Disabled()' ALL hard-coded timers and iterated SpecialAbilities[] to disable those as well.
It helped some more..but, no cigar...
The next two crashes were here:
https://github.com/EQEmu/Server/blob/master/zone/client_process.cpp#L698
and
https://github.com/EQEmu/Server/blob/master/ucs/clientlist.cpp#L626
And that's about where I am... Comments welcomed and here's a copy of my current test code:
http://wiki.eqemulator.org/i?Module=Pastebin&Paste=ZdfMAHUI
The text was updated successfully, but these errors were encountered: