View Issue Details

IDProjectCategoryView StatusLast Update
0005600The Dark ModCodingpublic02.05.2021 11:59
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilitysometimes
Status assignedResolutionopen 
Product VersionTDM 2.09 
Target VersionTDM 2.10 
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.

Activities

There are no notes attached to this issue.

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