You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Game crashes when exiting Replay Mode while player places beacon #76
Game crashes when exiting Replay Mode while player places beacon. Maybe also happens in regular match. However, this crash is easy to reproduce in Replay Mode when using Frame Step functionality from GenTool to reach specific frame in Replay.
GenTool fixes this crash by injecting naked function at address 0x4544C1 taking 6 bytes.
> generalszh.exe!AsciiString::AsciiString(const AsciiString & stringSrc) Line 87 C++
[Inline Frame] generalszh.exe!PlayerTemplate::getBeaconTemplate() Line 109 C++
generalszh.exe!GameLogic::logicMessageDispatcher(GameMessage * msg, void * userData) Line 1614 C++
generalszh.exe!GameLogic::processCommandList(CommandList * list) Line 2565 C++
generalszh.exe!GameLogic::update() Line 3735 C++
generalszh.exe!Win32GameEngine::update() Line 93 C++
generalszh.exe!GameEngine::execute() Line 823 C++
generalszh.exe!GameMain(int argc, char * * argv) Line 47 C++
generalszh.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 1038 C++
[Inline Frame] generalszh.exe!invoke_main() Line 102 C++
generalszh.exe!__scrt_common_main_seh() Line 288 C++
kernel32.dll!75abfcc9() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!772682ae() Unknown
ntdll.dll!7726827e() Unknown
Exception thrown at 0x00672BBA in generalszh.exe: 0xC0000005: Access violation reading location 0x000000D0.
Crashing code
voidGameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
{
...
case GameMessage::MSG_PLACE_BEACON:
{
// how many does this player have active?
Coord3D pos = msg->getArgument( 0 )->location;
Region3D r;
TheTerrainLogic->getExtent(&r);
if (!r.isInRegionNoZ(&pos))
pos = TheTerrainLogic->findClosestEdgePoint(&pos);
const ThingTemplate *thing = TheThingFactory->findTemplate( thisPlayer->getPlayerTemplate()->getBeaconTemplate() ); // <--- xezon: crashes here when getPlayerTemplate() returns NULLif (thing && !TheVictoryConditions->hasSinglePlayerBeenDefeated(thisPlayer))
Activity
xezon commentedon Jun 1, 2025
Attached replay that crashes when exiting the Replay playback at logic frame 115.
beacon_crash_frame_115.zip
Callstack
Crashing code
# This is a combination of 977 commits.
feat(release): automated GitHub Actions release pipeline (TheSuperHac…