Member Avatar


Hell sadly I dont understand much about memorypool so I tryed to use a memorypool from other sources.

My problem: The gameserver always crash and the debugger shows the following error:
Unhandled exception at 0x01034a65 in GameServer.exe: 0xC0000005: Access violation reading location 0xcdcdcdd5.

First the first memorypool with which everything works fine (except its really old and need much rework)

This is the second memorypool with which Im getting the error above.

Code on where I receive the error:

CMObject* CObjectFactory::MakeNewObject(eOBJTYPE Kind,RwUInt32 UniqueID, sGU_OBJECT_CREATE* pBaseObjectInfo)
    CMObject* pObject = NULL ;
    switch( Kind )
    case OBJTYPE_MOB:           pObject = MonsterPool->Alloc();         break;
    default:    return NULL;

    pObject->Init(Kind,UniqueID,pBaseObjectInfo); <---------- HERE I RECEIVE THE ERROR

    return pObject;

The init function:

BOOL CMObject::Init(eOBJTYPE kind, RwUInt32 UniqueID, sGU_OBJECT_CREATE* pBaseObjectInfo)

    UniqueID = UniqueID;


    return TRUE;

I really have no idea why its not working with the second memorypool...

Please show the entire header and source for the CMObject class.