When I build my project and run game, I get this error always.
Unhandled exception at 0x76fb2073 in Screen.exe: 0xC0000005: Access violation writing location 0x00000338 or sometimes 0x00000000.
When I debug this error, I can see the free.c source file.
else
#endif /* _WIN64 */
{
retval = HeapFree(_crtheap, 0, pBlock);
**if (retval == 0)
{
errno = _get_errno_from_oserr(GetLastError());
}
}
}
When I trace this debug path, I found that error occured on this line on my screen.cpp file.
if(FAILED(D3DXLoadMeshFromX(szName, D3DXMESH_SYSTEMMEM,
m_pd3dDevice, &pAdjacencyBuffer,
&pD3DXMtrlBuffer, NULL, &pMesh->dwNumMaterial,
&pMesh->pMesh)))
I can't know why this error occur all time when I run this game.
Need your help!