Closed
Description
Edit: This was affecting both memory implementations
This occurs when having the "Search and destroy" battleplan enabled while units are alive and you exit the game.
This likely only affects the null memory implementation and has no affect on retail. This is due to the way the memory manager does not zero freed blocks of memory. So dangling pointers can still point to something that has valid data within it.
But during reset when the player lists are cleared, the game will assign a temporary team to items as the original player no longer exists. The issue is comes up when the game is trying to get the m_owningPlayer
of the new team. Which should be nulled at this point but is pointing to freed memory.
Callstack when the issue occurs.
> generalszh.exe!TeamPrototype::getControllingPlayer() Line 872 C++
generalszh.exe!Team::getControllingPlayer() Line 1400 C++
generalszh.exe!Player::getRelationship(const Team * that) Line 582 C++
generalszh.exe!Object::look() Line 4959 C++
generalszh.exe!Object::handleShroud() Line 4793 C++
generalszh.exe!Object::handlePartitionCellMaintenance() Line 4778 C++
generalszh.exe!Object::setShroudClearingRange(float newShroudClearingRange) Line 5192 C++
generalszh.exe!localApplyBattlePlanBonusesToObject(Object * obj, void * userData) Line 3563 C++
generalszh.exe!Player::removeBattlePlanBonusesForObject(Object * obj) Line 3618 C++
generalszh.exe!Player::becomingTeamMember(Object * obj, bool yes) Line 1092 C++
generalszh.exe!Object::setOrRestoreTeam(Team * team, bool restoring) Line 865 C++
generalszh.exe!Object::setTemporaryTeam(Team * team) Line 846 C++
generalszh.exe!Object::setTeam(Team * team) Line 837 C++
generalszh.exe!Team::~Team() Line 1378 C++
[External Code]
generalszh.exe!MemoryPoolObject::deleteInstance() Line 113 C++
generalszh.exe!deleteTeamCallback(Team * o) Line 839 C++
generalszh.exe!TeamPrototype::removeAll_TeamInstanceList(void(*)(Team *) p) Line 675 C++
generalszh.exe!TeamPrototype::~TeamPrototype() Line 845 C++
[External Code]
generalszh.exe!MemoryPoolObject::deleteInstance() Line 113 C++
generalszh.exe!TeamFactory::clear() Line 217 C++
generalszh.exe!PlayerList::reset() Line 129 C++
generalszh.exe!SubsystemInterfaceList::resetAll() Line 190 C++
generalszh.exe!GameEngine::reset() Line 721 C++
generalszh.exe!Win32GameEngine::reset() Line 77 C++