EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Bugs (https://www.eqemulator.org/forums/forumdisplay.php?f=622)
-   -   /who all Crashes Zone (https://www.eqemulator.org/forums/showthread.php?t=9654)

krich 10-02-2003 02:15 PM

/who all Crashes Zone
 
Has anyone encountered a situation where doing a /who all will crash every zone that has players in it except the one that the person that did the /who all is in (unless there are people there).

I added some code to prevent this from happening, but I haven't had time to look into fixing the cause. I'll share the code I added to prevent this as soon as I am back at my normal computer.

Could this be just a Linux thing?

Regards,

krich

Merth 10-02-2003 02:27 PM

Yeah, it was a bug in the code. The next version to be pushed out to CVS will fix it.

Here's the code changed in worldserver.cpp if you want to copy (looks like you already caught it though):
Code:

case 0x2010:{
        if(!ZoneLoaded)
                break;
                WhoAllReturnStruct* wars= (WhoAllReturnStruct*)pack->pBuffer;
        if (wars && wars->id!=0 && wars->id<0xFFFFFFFF){
                Client* client = entity_list.GetClientByID(wars->id);
                if (client) {
                        APPLAYER* outapp = new APPLAYER(0x0212, pack->size);
                        memcpy(outapp->pBuffer, pack->pBuffer, pack->size);
                        client->QueuePacket(outapp);
                }
                else {
                        LogFile->write(EQEMuLog::Debug, "Error: WhoAllReturnStruct did not point to a valid client!  "
                                "id=%i, playerineqstring=%i, playersinzonestring=%i.  Dumping WhoAllReturnStruct:",
                                wars->id, wars->playerineqstring, wars->playersinzonestring);
                        DumpPacket(pack);
                }
        }
        else
                LogFile->write(EQEMuLog::Error, "WhoAllReturnStruct: Could not get return struct!");
        break;
}

This is just a sanity check type fix because I don't know this area of code. The problem still exists, but at least it won't crash the code anymore.

krich 10-02-2003 02:42 PM

Yep, did almost exactly the same thing except my error message wasn't as sexy as yours. :shock:

Thanks Merth,

krich


All times are GMT -4. The time now is 02:29 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.