Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Bugs

Archive::Bugs Archive area for Bugs's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-13-2003, 03:13 PM
kate
Fire Beetle
 
Join Date: Nov 2002
Posts: 10
Default ZSList::SendWhoAll, wold server related crash bug FIX

Ok, after a little debugging, I think I got a fix.

The bug seems to be a linux only problem cased by people doing alot of /who all commands.

Ok, the file is world/zoneserver.cpp

function is: ZSList::SendWhoAll

ok here is the fix:

scroll down till you see this:
Code:
        int32 unknown52=totalusers;
        int32 unknown56=1;
        ServerPacket* pack2 = new ServerPacket(0x2010,64+totallength+(49*totalusers));
        char *buffer=(char*)malloc(pack2->size);
        char *bufptr=buffer;
        memset(buffer,0,pack2->size);
        memcpy(bufptr,&plid, sizeof(int32));
ok, the change starts with:
char *buffer=(char*)malloc(pack2->size);

make it read:
Code:
        int32 unknown52=totalusers;
        int32 unknown56=1;
        ServerPacket* pack2 = new ServerPacket(0x2010,64+totallength+(49*totalusers));
 //       char *buffer=(char*)malloc(pack2->size);
        uchar buffer[pack2->size]; // added line
        uchar *bufptr=buffer; // changed line
        memset(buffer,0,pack2->size);
Then at the end of the function you see:
Code:
        safe_delete(pack2);
        free(buffer);
        safe_delete(output);
}
and comment out the free line.
should like like this:
Code:
        safe_delete(pack2);
//      free(buffer);
        safe_delete(output);
}
Anyway, I have this running on the stormweavers server with no problems, let me know how the rest of you do.

This fix should work under windows as well, though at this point in time that has not been tested.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:59 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3