ripple01
Emperor
Hello all,
I am having some crash issues with my mod I am hoping someone can help me out with.
I have a crash that is happening in the late game 700 or 800 turns into a 1200 turn game.
The problem is that the crash is not consistent. I know that crashes re artdefines and the like will happen on the same turn, meaning I can save the game on, say, turn 700, and if there is an artdefines problem, it will consistently crash on, say, turn 705. This crash is not happening at the same time. For example, lets say I get a crash on turn 705. I can go back to my saved game at turn 700 and the next time it will get through turn 705 and may crash on, say, turn 732. Does anyone know what might cause these non-consistent crashes?
Furthermore, I have been using a debug .DLL, and I am getting a crash that is happening ~ turn 100 that is not happening when I use the regular release .DLL. This is the error message I am getting:
First-chance exception at 0x05f3b676 (CvGameCoreDLL.dll) in Civ4BeyondSword.exe: 0xC0000005: Access violation reading location 0xfeeefef2.
Unhandled exception at 0x05f3b676 (CvGameCoreDLL.dll) in Civ4BeyondSword.exe: 0xC0000005: Access violation reading location 0xfeeefef2.
The code in question is from CvDeal:
The line that is breaking is:
endTrade(pNode->m_data, getFirstPlayer(), getSecondPlayer(), bKillTeam);
Anyone give me any pointers on how to resolve these?
I am having some crash issues with my mod I am hoping someone can help me out with.
I have a crash that is happening in the late game 700 or 800 turns into a 1200 turn game.
The problem is that the crash is not consistent. I know that crashes re artdefines and the like will happen on the same turn, meaning I can save the game on, say, turn 700, and if there is an artdefines problem, it will consistently crash on, say, turn 705. This crash is not happening at the same time. For example, lets say I get a crash on turn 705. I can go back to my saved game at turn 700 and the next time it will get through turn 705 and may crash on, say, turn 732. Does anyone know what might cause these non-consistent crashes?
Furthermore, I have been using a debug .DLL, and I am getting a crash that is happening ~ turn 100 that is not happening when I use the regular release .DLL. This is the error message I am getting:
First-chance exception at 0x05f3b676 (CvGameCoreDLL.dll) in Civ4BeyondSword.exe: 0xC0000005: Access violation reading location 0xfeeefef2.
Unhandled exception at 0x05f3b676 (CvGameCoreDLL.dll) in Civ4BeyondSword.exe: 0xC0000005: Access violation reading location 0xfeeefef2.
The code in question is from CvDeal:
Code:
void CvDeal::kill(bool bKillTeam)
{
if ((getLengthFirstTrades() > 0) || (getLengthSecondTrades() > 0))
{
CvWString szString;
CvWStringBuffer szDealString;
CvWString szCancelString = gDLL->getText("TXT_KEY_POPUP_DEAL_CANCEL");
if (GET_TEAM(GET_PLAYER(getFirstPlayer()).getTeam()).isHasMet(GET_PLAYER(getSecondPlayer()).getTeam()))
{
szDealString.clear();
GAMETEXT.getDealString(szDealString, *this, getFirstPlayer());
szString.Format(L"%s: %s", szCancelString.GetCString(), szDealString.getCString());
gDLL->getInterfaceIFace()->addMessage((PlayerTypes)getFirstPlayer(), true, GC.getEVENT_MESSAGE_TIME(), szString, "AS2D_DEAL_CANCELLED");
}
if (GET_TEAM(GET_PLAYER(getSecondPlayer()).getTeam()).isHasMet(GET_PLAYER(getFirstPlayer()).getTeam()))
{
szDealString.clear();
GAMETEXT.getDealString(szDealString, *this, getSecondPlayer());
szString.Format(L"%s: %s", szCancelString.GetCString(), szDealString.getCString());
gDLL->getInterfaceIFace()->addMessage((PlayerTypes)getSecondPlayer(), true, GC.getEVENT_MESSAGE_TIME(), szString, "AS2D_DEAL_CANCELLED");
}
}
CLLNode<TradeData>* pNode;
for (pNode = headFirstTradesNode(); (pNode != NULL); pNode = nextFirstTradesNode(pNode))
{
endTrade(pNode->m_data, getFirstPlayer(), getSecondPlayer(), bKillTeam);
}
for (pNode = headSecondTradesNode(); (pNode != NULL); pNode = nextSecondTradesNode(pNode))
{
endTrade(pNode->m_data, getSecondPlayer(), getFirstPlayer(), bKillTeam);
}
GC.getGameINLINE().deleteDeal(getID());
}
The line that is breaking is:
endTrade(pNode->m_data, getFirstPlayer(), getSecondPlayer(), bKillTeam);
Anyone give me any pointers on how to resolve these?