@DLL Modders:
Assistance needed!
I have a minidump that shows a crash at the last line of the following:
Code:
// Returns true if attack was made...
bool CvSelectionGroup::groupAttack(int iX, int iY, int iFlags, bool& bFailedAlreadyFighting)
{
PROFILE_FUNC();
/************************************************************************************************/
/* DCM 04/19/09 Johny Smith */
/************************************************************************************************/
// Dale - SA: Stack Attack START
if (GC.isDCM_STACK_ATTACK())
{
return groupStackAttack(iX, iY, iFlags, bFailedAlreadyFighting);
}
// Dale - SA: Stack Attack END
/************************************************************************************************/
/* DCM END */
/************************************************************************************************/
/************************************************************************************************/
/* RevolutionDCM 04/19/09 Glider1 */
/************************************************************************************************/
// RevolutionDCM - attack support
CvPlot* pOrigPlot = plot();
CLLNode<IDInfo>* pUnitNode;
CvUnit* pLoopUnit;
CvPlot* pDestPlot = GC.getMapINLINE().plotINLINE(iX, iY);
// RevolutionDCM - end
/************************************************************************************************/
/* RevolutionDCM END Glider1 */
/************************************************************************************************/
if (iFlags & MOVE_THROUGH_ENEMY)
{
if (generatePath(plot(), pDestPlot, iFlags))
{
pDestPlot = getPathFirstPlot();
}
}
FAssertMsg(pDestPlot != NULL, "DestPlot is not assigned a valid value");
bool bStack = (isHuman() && ((getDomainType() == DOMAIN_AIR) || GET_PLAYER(getOwnerINLINE()).isOption(PLAYEROPTION_STACK_ATTACK)));
bool bAttack = false;
bFailedAlreadyFighting = false;
if (getNumUnits() > 0)
{
if ((getDomainType() == DOMAIN_AIR) || (stepDistance(getX(), getY(), pDestPlot->getX_INLINE(), pDestPlot->getY_INLINE()) == 1))
{
The wierd thing is that pDestPlot is coming up as -1 x and -1 y. This is happening, apparently, because the call is made at the last line here:
Code:
bool CvSelectionGroup::continueMission(int iSteps)
{
PROFILE_FUNC();
CvUnit* pTargetUnit;
bool bDone;
bool bAction;
bool bFailed;
CLLNode<MissionData>* headQueueNode = headMissionQueueNode();
FAssert(!isBusy());
FAssert(headQueueNode != NULL);
FAssert(getOwnerINLINE() != NO_PLAYER);
if (getActivityType() == ACTIVITY_AWAKE)
{
return false;
}
FAssert(getActivityType() == ACTIVITY_MISSION);
if (headQueueNode == NULL)
{
// just in case...
setActivityType(ACTIVITY_AWAKE);
return false;
}
bDone = false;
bAction = false;
bFailed = false;
if (headQueueNode->m_data.iPushTurn == GC.getGameINLINE().getGameTurn() || (headQueueNode->m_data.iFlags & MOVE_THROUGH_ENEMY))
{
if (headQueueNode->m_data.eMissionType == MISSION_MOVE_TO && canAllMove())
{
bool bFailedAlreadyFighting;
if (groupAttack(headQueueNode->m_data.iData1, headQueueNode->m_data.iData2, headQueueNode->m_data.iFlags, bFailedAlreadyFighting))
{
And where headQueueNode is defined in this line:
CLLNode<MissionData>* headQueueNode = headMissionQueueNode();
headMissionQueueNode() is coming up as getElapsedGameTurns(void) when you hover over it in the minidump debug mode.
Exceedingly odd and highly common to get this crash. Any ideas why this may be happening where headMissionQueueNode() somehow refers to getElapsedGameTurns(void)? The last time I saw something like this a clean compile was the trick to keeping it from taking place. This is happening on a clean compile.
Again... very odd. May also explain some other strange stuff taking place.