Quite a few threads have been made regarding in-game settings such as max foreground fps, ambience volume etc being reset since 10.0.7. This is being caused by an issue where an addon using the C_CVar.RegisterCVar API writes too much data to the config.wtf file.
The issue can be triggered by multiple addons (such as Details Damage Meter) and is fully documented here:
opened 11:46PM - 25 Mar 23 UTC
Bug
Mainline
The client doesn't correctly write out console variables with very large values … leading to unrelated variables in the Config.wtf file getting eaten.
As an example, refer to the following excerpt - note that the "SET" line for "TheVeryHungryConsoleVariable" has two issues:
1. The value was truncated but has no terminating quotation mark.
2. There's no line separator after its value - placing the "SET" for "graphicsOutlineMode" on the same line.
```
SET weatherDensity "0"
SET gxMaximize "0"
SET TheVeryHungryConsoleVariable "nomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomSET graphicsOutlineMode "0"
SET LowLatencyMode "1"
SET volumeFog "1"
SET raidGraphicsShadowQuality "0"
```
This issue largely impacts addons that are using the the [C_CVar.RegisterCVar](https://wowpedia.fandom.com/wiki/API_C_CVar.RegisterCVar) API. As of patch 10.0.7 CVars registered through this function are now written out to disk, however this change conflicts with a (rare) use case where this API was used to create temporary CVars that would only store data between UI reloads and character changes *without being written to disk*. Seemingly - some addons have been storing silly amounts of data in this manner and are now running into this issue.
# Test case
1. Log into the game.
2. Execute the following: `/run C_CVar.RegisterCVar("TheVeryHungryConsoleVariable") C_CVar.SetCVar("TheVeryHungryConsoleVariable", string.rep("nom", 1024))`.
3. Quit the game. Don't worry, you'll come back in a few years anyway.
4. Open the Config.wtf file and inspect the damage that has been caused.
The net result is that addons are able to unintentionally disable and reset Blizzard game settings.
1 Like