forked from electronicarts/CnC_Generals_Zero_Hour
-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Description
When simulating replays with #923 and not calling TheGameLogic->clearGameData(), the game crashes with the following callstack:
[0x0] generalszh!Player::becomingTeamMember+0x67 0x19f91c 0x53ad5d
[0x1] generalszh!Object::setOrRestoreTeam+0x7d 0x19f934 0x53aca6
[0x2] generalszh!Object::setTeam+0x36 0x19f96c 0x493921
[0x3] generalszh!Team::~Team+0x81 0x19f980 0x493848
[0x4] generalszh!Team::`scalar deleting destructor'+0x8 0x19f9b0 0x4161fb
[0x5] generalszh!MemoryPoolObject::deleteInstanceInternal+0x1b 0x19f9b8 0x4929fa
[0x6] generalszh!TeamPrototype::~TeamPrototype+0x7a 0x19f9c8 0x492828
[0x7] generalszh!TeamPrototype::`scalar deleting destructor'+0x8 0x19f9fc 0x490dc3
[0x8] generalszh!TeamFactory::~TeamFactory+0x73 0x19fa04 0x490d38
[0x9] generalszh!TeamFactory::`scalar deleting destructor'+0x8 0x19fa40 0x41c7ba
[0xa] generalszh!SubsystemInterfaceList::shutdownAll+0x1a 0x19fa48 0x40e037
[0xb] generalszh!GameEngine::~GameEngine+0xb7 0x19fa58 0x71812a
[0xc] generalszh!Win32GameEngine::~Win32GameEngine+0x1a 0x19fa84 0x7180f8
[0xd] generalszh!Win32GameEngine::`scalar deleting destructor'+0x8 0x19fa8c 0x412db1
[0xe] generalszh!GameMain+0xa1 0x19fa94 0x401c3b
[0xf] generalszh!WinMain+0x4eb 0x19faa4 0x8a5e12
The callstack indicates that this is independent of replay simulation.
The line if( getNumBattlePlansActive() > 0 && obj->areModulesReady() ) in Player::becomingTeamMember seems to cause the Access Violation.
To reproduce, merge the mentioned PR, remove the @todo code at the end of SimulateReplayListSingleProcess and call the game with:
generalszh.exe -simReplay replay.rep
Any replay will do, the one attached is very short and works well for testing.
Metadata
Metadata
Assignees
Labels
No labels