View Issue Details

IDProjectCategoryView StatusLast Update
0005600The Dark ModCodingpublic15.11.2022 17:07
Reporterstgatilov Assigned Tostgatilov  
Status assignedResolutionopen 
Product VersionTDM 2.09 
Target VersionTDM 2.12 
Summary0005600: Crashes due to cvarSystem not being threadsafe
DescriptionI was doing a regular automatic start of every released FM, when I got a crash on northdale2 FM.
The crash happened immediately after automation "clicked attack to start game" in idCVarSystemLocal::FindInternal function.
Looking at registers and error message, it was clear that cvars[i] was NULL when memory was read, while at the moment of crash it already pointed to correct idCVar object.
Apparently, it was a race condition: someone had already put cvar to hash table, but had not updated array element yet.

It turns out that quite a lot of code start registering or setting cvars when game starts, so this is a serious problem.
I think we should add mutex to idCVarSystemLocal, and protect all methods of idCVarSystemLocal with it.
TagsNo tags attached.




20.12.2021 17:10

developer   ~0014602

Move to 2.11 ?

Issue History

Date Modified Username Field Change
02.05.2021 11:59 stgatilov New Issue
02.05.2021 11:59 stgatilov Status new => assigned
02.05.2021 11:59 stgatilov Assigned To => stgatilov
20.12.2021 17:10 nbohr1more Note Added: 0014602
21.12.2021 14:11 stgatilov Target Version TDM 2.10 => TDM 2.11
15.11.2022 06:05 nbohr1more Severity normal => crash
15.11.2022 17:07 nbohr1more Target Version TDM 2.11 => TDM 2.12