I`m getting exception during debugging:
Exception thrown at 0x02D5C748 in LoongDB.exe: 0xC0000005: Access violation executing location 0x02D5C748.
Also error points to
02D5C748 mov ecx,dword ptr ds:[7A3C60h]
in disassebly window.
I`m trying to compile old game server.
// main.cpp
INT APIENTRY _tWinMain(HINSTANCE hInst, HINSTANCE, LPTSTR, INT)
{
// ЅыЦ№ЖБД»±Ј»¤ј°µзФґ№ЬАн
::SystemParametersInfo(SPI_SETLOWPOWERTIMEOUT, 0, NULL, 0);
::SystemParametersInfo(SPI_SETPOWEROFFTIMEOUT, 0, NULL, 0);
::SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT, 0, NULL, 0);
vEngine::InitNetwork();
vEngine::InitEngine();
#ifdef _DEBUG
EXCEPTION_PROTECT;
#endif
CLoong *pLoong = new CLoong;
if(!pLoong->Init(hInst))
{
//іхКј»ЇК§°Ь
SAFE_DEL(pLoong);
ERR(_T("Loong init failed!"));
return FALSE;
}
pLoong->MainLoop();
SAFE_DEL(pLoong);
vEngine::DestroyEngine();
vEngine::DestroyNetwork();
return 0;
}
// Loong.h (contains CLoong)
CLoong::CLoong()
{
m_bTerminate = FALSE;
m_bGameServerLogout = FALSE;
m_bGameServerConnect = FALSE;
m_pDB = new CLoongDB;
m_dwLogTime = 0;
m_szLogFilePostfix[0] = '\0';
ZeroMemory(m_szWorldName, sizeof(m_szWorldName));
//ZeroMemory(m_szServerName, sizeof(m_szServerName));
m_pLoadSimRole = new tagNDBS_LoadSimRole;
m_pCreateRole = new tagNDBS_CreateRole;
m_pLoadBaiBao = new tagNDBS_LoadBaiBao;
m_pLoadBaiBaoLog = (tagNDBS_LoadBaiBaoLog*)m_pBuffer;
m_pLoadRole = (tagNDBS_LoadRole *)m_pBuffer;
m_Status.dwVerLoongDB = LOONGDB_BUILD_REVISION;
m_Status.dwVerBeton = BETON_BUILD_REVISION;
m_Status.dwVerVEngine = VENGINE_BUILD_REVISION;
m_Status.dwVerServerDefine = SERVERDEFINE_BUILD_REVISION;
m_Status.dwVerXML = XMLREADER_BUILD_REVISION;
m_MsgCmdMgr.Init();
}
So i found that error appears at
if(!pLoong->Init(hInst))
so seems like something wrong with
pLoong->Init(hInst)
Can someone please provide a solution or some sort of tips that will help me solve this?
Can add any code you need.
User contributions licensed under CC BY-SA 3.0