Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2005, 12:37 PM
johane
Sarnak
 
Join Date: Sep 2005
Location: Gold Coast, Oz
Posts: 69
Default 2 Trivial bugs fixed

Not sure this is the right place for these....

I was running World under Valgrind (memory leak checker) and found a couple of "trivial" bugs.

common/linked_list.h
Code:
template<class TYPE>
LinkedList<TYPE>::LinkedList()
{
        list_destructor_invoked = false;
        first = 0;
        count = 0;
        dont_delete = false; // ADDED this line
}

Note that the destructor for this class checks that dont_delete is false, so this prevents it ever being called with an unitialised value.


world/net.cpp

in main(), from line 238:

Code:
 if (!zoneserver_list.worldclock.loadFile(EQTIME_INI))
                LogFile->write(EQEMuLog::Error, "Unable to load %s", EQTIME_INI);
        
        char tmp[20];
        tmp[0]=0x00;// ADDED this
        database.GetVariable("holdzones",tmp, 20);
This one gets rid of a possible error in common/database.cpp.

It's actually pretty solid without this, but this improves the style... if anyone cares.


These two fixes make Valgrind report no errors outside libc for world.
Reply With Quote
  #2  
Old 09-30-2005, 11:53 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

nice, the linked list one will actually make a difference, I have seen that cause problems but never been able to track it down. Both changes have been made.


... now to get zone to run in valgrind, lol....
Reply With Quote
  #3  
Old 09-30-2005, 11:39 PM
johane
Sarnak
 
Join Date: Sep 2005
Location: Gold Coast, Oz
Posts: 69
Default

Quote:
Originally Posted by fathernitwit
... now to get zone to run in valgrind, lol....
Yeah, there's something rather odd happening with zone under emulation (valgrind is a CPU emulator). I am currently suspecting the tls libraries. But it has to wait till I can get a slightly bigger linux machine - 233MHz and 256MB seems to be just a bit small to run EMU under debuggers for some strange reason... odd that.

Glad the list thing is useful though. I'll keep trying to identify more "defects" anyway.
Reply With Quote
  #4  
Old 10-01-2005, 03:46 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

this has been evaluated a few times in the past, and seems to relate to valgrind's implementation of pthread mutexes.

but yea, 233Mhz will not cut it, it barily runs on a 3.2 Ghz machine without timing out.
Reply With Quote
Reply


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 05:28 AM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3