View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005600||The Dark Mod||Coding||public||02.05.2021 11:59||02.05.2021 11:59|
|Product Version||TDM 2.09|
|Target Version||TDM 2.10|
|Summary||0005600: Crashes due to cvarSystem not being threadsafe|
|Description||I 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.
|Tags||No tags attached.|