@MattCA I think this crash may be caused by some of your recent parallel map specific changes.REpeatable crash . . . . . . . .
This code:
Code:
CvUnit* CvPlayer::addUnit()
{
#ifdef PARALLEL_MAPS
return m_units[GC.getGame().getCurrentMap()]->add();
#else
return m_units.add();
#endif
}
Edit: {
This is just a 5 minutes initial assessment. haven't used the VS debugger, just seen that this assert happen right before the CTD : ↓
CvPlayer::initUnit(....)
And then this one right after (just a continuation of the above issue) : ↓CvUnit* pUnit = addUnit();
FAssertMsg(pUnit != NULL, "Unit is not assigned a valid value");
FAssertMsg(pUnit != NULL, "Unit is not assigned a valid value");
CvUnit::upgrade(...)
}pUpgradeUnit = GET_PLAYER(getOwner()).initUnit(...)
FAssertMsg(pUpgradeUnit != NULL, "UpgradeUnit is not assigned a valid value");
FAssertMsg(pUpgradeUnit != NULL, "UpgradeUnit is not assigned a valid value");
EditEdit: I can't spot any errors in your change there though... Perhaps the error is caused by something unrelated.
Next step is to figure out why "T* FFreeListTrashArray<T>::add()" may return NULL; or to run the save in VS debugger and perhaps add some extra logging related to max unit counts and so on.
Maybe the array is full?
Last edited: