Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

WorldServer crash

Initiate Mage
Joined
Jun 26, 2014
Messages
2
Reaction score
0
Hello,

My WorldServer crash at random time.

I've the error in file eh_*.txt
Code:
2017/10/ 9 22:44:25
ROL//CALLED
2017/10/ 9 22:44:25
ROL//NOT FIXED//5, 721
2017/10/ 9 22:44:25
[Remove Object]: ID 721, m_dwObjAryIdx -1
The 721 ID is MI_PET_AIBATT.

I've found the error in World.cpp and Linkmap.cpp
In World.cpp
Code:
void CWorld::RemoveObjArray( CObj* pObj )
{
#ifdef __WORLDSERVER
    if( pObj->m_dwObjAryIdx == 0xffffffff )
    {
        //WriteError( "RemoveObjArray  pObj->m_dwObjAryIdx == 0xffffffff " );
        WriteError( "[Remove Object]: ID %d, m_dwObjAryIdx %d", pObj->GetProp()->dwID, pObj->m_dwObjAryIdx);
        return;
    }


    if( m_apObject[pObj->m_dwObjAryIdx] == pObj )
    {
        m_ObjStack.Push( pObj->m_dwObjAryIdx );
        m_apObject[pObj->m_dwObjAryIdx]        = NULL;
    }
    else
    {
        WriteError( "RemoveObjArray m_apObject[pObj->m_dwObjAryIdx] != pObj " );
    }
    m_cbRunnableObject--;
#else    // __WORLDSERVER
    CLandscape* pLandscape    = GetLandscape( pObj );


    if( NULL != pLandscape ) 
    {
        pLandscape->RemoveObjArray( pObj );
    }
    /*
    else 
    {
        char szMessage[260]    = { 0, };
        sprintf( szMessage, "ROA error with landscape unloaded - g_pPlayer = %f, %f\t//pObj = %f, %f",
            g_pPlayer->GetPos().x, g_pPlayer->GetPos().z, pObj->GetPos().x, pObj->GetPos().z );
        DEBUGOUT2( szMessage );
    }
    */
#endif    // __WORLDSERVER
}
In LinkMap.cpp
Code:
BOOL CLinkMap::RemoveObjLink2( CObj* pObj )
{
    WriteError( "ROL//CALLED" );


    int nLinkLevel    = pObj->GetLinkLevel();
    int nLinkType    = pObj->GetLinkType();
    CObj** aObjLinkMap    = GetObj( nLinkType, nLinkLevel );
    int nMaxWidth    = GetLinkWidth( nLinkType, nLinkLevel ) * m_nLandWidth;
    int nMaxPos        = nMaxWidth * nMaxWidth;


    for( int nPos = 0; nPos < nMaxPos; nPos++ )
    {
        if( aObjLinkMap[nPos] == pObj )
        {
            aObjLinkMap[nPos]    = pObj->GetNextNode();
            pObj->DelNode();
            WriteError( "ROL//FIXED//%d, %d", pObj->GetType(), pObj->GetIndex() );
            return TRUE;
        }
    }
    WriteError( "ROL//NOT FIXED//%d, %d", pObj->GetType(), pObj->GetIndex() );
    return FALSE;
}

Sorry for my bad english

And thanks for helps

ultimatereborn
 
Last edited:
Back
Top