WorldServer crash

10/10/2017 19:23 ultimatereborn#1
Hi all,

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;

        }

    }

    [B]WriteError( "ROL//NOT FIXED//%d, %d", pObj->GetType(), pObj->GetIndex() );[/B]

    return FALSE;

}


Sorry for my bad english



And thanks for helps



ultimatereborn