View Issue Details

IDProjectCategoryView StatusLast Update
0002683The Dark ModAIpublic27.10.2011 05:17
Reportergreebo Assigned Tograyman  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product VersionTDM 1.04 
Target VersionTDM 1.05Fixed in VersionTDM 1.05 
Summary0002683: Crash when starting The Thieves
DescriptionThe rat atdm_ai_rat_small_5 is running into a NULL when accessing memory.currentPath in the NextPath() method.
Additional Informationgamex86.dll!idHashIndex::GenerateKey(const char * string=0x107ace70, bool caseSensitive=false) Line 367 + 0xf bytes C++
gamex86.dll!idDict::FindKey(const char * key=0x107ace70) Line 475 + 0x11 bytes C++
gamex86.dll!idDict::GetString(const char * key=0x107ace70, const char * defaultString=0x107acdd3) Line 229 + 0xc bytes C++
gamex86.dll!ai::MovementSubsystem::NextPath() Line 235 + 0x1a bytes C++
gamex86.dll!ai::MovementSubsystem::Patrol() Line 215 + 0xf bytes C++
gamex86.dll!ai::MovementSubsystem::PerformTask() Line 76 C++
gamex86.dll!ai::Mind::Think() Line 89 + 0x23 bytes C++
gamex86.dll!idAI::Think() Line 2282 + 0x28 bytes C++
gamex86.dll!idGameLocal::RunFrame(const usercmd_t * clientCmds=0x009656e0) Line 3129 + 0xf bytes C++
TagsNo tags attached.

Activities

grayman

grayman

08.03.2011 15:01

viewer   ~0003736

Last edited: 08.03.2011 15:02

The code ignores the spawnarg "patrol" until it's too late, so rats are already considered to be on patrol before "patrol = 0" takes effect.

This lets the code get to a change made in 1.04 that prevented AI on patrol from sitting down, sleeping, etc. in the wrong place when their patrol routes were disturbed. The assumption was that if they were executing this code, they were patrolling and had valid patrol data.

I'll add a check for NULL at the crash point, but having this happen exposed the problem with the "patrol" spawnarg. Correcting that as well, which will keep non-patrolling AI out of the patrol code where they don't belong.

These maps have rats with "patrol = 0":

Special Delivery
The Thieves
Storm
Trapped

grayman

grayman

08.03.2011 15:41

viewer   ~0003738

Fixed.

rev. 4667:

MovementSubsystem.cpp
IdleState.cpp

Issue History

Date Modified Username Field Change
08.03.2011 11:19 greebo New Issue
08.03.2011 11:20 greebo Status new => confirmed
08.03.2011 13:55 grayman Assigned To => grayman
08.03.2011 13:55 grayman Status confirmed => assigned
08.03.2011 15:01 grayman Note Added: 0003736
08.03.2011 15:02 grayman Note Edited: 0003736
08.03.2011 15:41 grayman Note Added: 0003738
08.03.2011 15:41 grayman Status assigned => resolved
08.03.2011 15:41 grayman Resolution open => fixed
08.03.2011 15:41 grayman Fixed in Version => TDM 1.05
27.10.2011 05:17 greebo Status resolved => closed