Hello everyone, so here is my concern my AccountServer.exe crash constantly when I look rpt file and I did a search in the map file I found this...:
then the file buffer.cpp I have this:
if someone could help me it would be nice
*sorry for my English, translate with google.
Code:
0001:0001d1b0 ?Fetch@CBuffer2@@QAEPAV1@PAPAV1@KPAVCRC32@@@Z 0041e1b0 f buffer.obj
Code:
CBuffer2* CBuffer2::Fetch( CBuffer2** ppRecvBuffer, DWORD dwBytes, CRC32* pcrc )
{
crc( pcrc ); // m_pcrc
m_pTail += dwBytes;
ASSERT( m_pTail <= m_lpBufMax );
int nRemnant;
LPBYTE ptr = GetReadableBuffer( &nRemnant );
CBuffer2* pOld = NULL, *pBuffer;
u_long uPacketSize;
DWORD dwCrc, dwDataSize;
byte digest[4];
u_long uHdrSize = CBuffer2::GetHdrSize( (BOOL)pcrc );
while( 1 )
{
if( nRemnant < (int)( uHdrSize ) )
{
if( cb > 0 ) {
pOld = *ppRecvBuffer;
pOld->m_pTail -= nRemnant; // remove remnant from old buffer
pBuffer = new CBuffer2;
ASSERT( pBuffer->m_pTail + nRemnant <= pBuffer->m_lpBufMax );
memcpy( pBuffer->m_pTail, ptr, nRemnant );
pBuffer->m_pTail += nRemnant;
*ppRecvBuffer = pBuffer;
}
return pOld;
}
else
{
if( pcrc )
{
dwCrc = *(UNALIGNED LPDWORD)ptr;
dwDataSize = ntohs( *(UNALIGNED LPWORD)( ptr + sizeof(DWORD) ) ) -2;
pcrc->Restart();
pcrc->Update( (const byte*)( &dwDataSize ), sizeof(DWORD) );
pcrc->Final( digest );
if( *(UNALIGNED LPDWORD)digest != dwCrc )
{
WSASetLastError( ERROR_BAD_NET_NAME );
return NULL;
}
dwCrc = *(UNALIGNED LPDWORD)( ptr + sizeof(DWORD) + sizeof(WORD) );
uPacketSize = uHdrSize + dwDataSize;
}
else
{
uPacketSize = uHdrSize + ntohs( *(UNALIGNED LPWORD)ptr ) - 2;
}
if( nRemnant < (int)( uPacketSize ) )
{
if( (int)( uPacketSize ) > (*ppRecvBuffer)->GetSize() )
{
pOld = *ppRecvBuffer;
pBuffer = new CBuffer2( uPacketSize );
}
else
{
if( (*ppRecvBuffer)->cb > 0 )
{
pOld = *ppRecvBuffer;
pBuffer = new CBuffer2;
}
}
if( pOld )
{
ASSERT( pBuffer->m_pTail + nRemnant <= pBuffer->m_lpBufMax );
memcpy( pBuffer->m_pTail, ptr, nRemnant );
// if( nRemnant > 0 )
// {
// ASSERT( CBuffer::IsHeader( *ptr ) );
// }
pBuffer->m_pTail += nRemnant;
*ppRecvBuffer = pBuffer;
}
return pOld;
}
else // completion
{
if( pcrc )
{
pcrc->Restart();
pcrc->Update( (const byte*)( ptr + uHdrSize ), dwDataSize );
pcrc->Final( digest );
if( *(UNALIGNED LPDWORD)digest != dwCrc )
{
WSASetLastError( ERROR_BAD_NET_NAME );
return NULL;
}
}
(*ppRecvBuffer)->cb++;
nRemnant -= ( uPacketSize );
ptr += ( uPacketSize );
}
}
}
return NULL;
}
*sorry for my English, translate with google.