Small annoying bug - Nothing broken

Found a bug with the CensusPlus UI Mod? Post it here!
Post Reply
User avatar
Census Taker
Posts: 659
Joined: Thu May 22, 2008 11:36 am
Location: Copenhagen, DK

Small annoying bug - Nothing broken

Post by FuxieDK »

When a census have run (or when you log into a new toon), a slider an choose how much time (5-30 min) needs to pass until next census starts.. It defaults to 30, but I always change it to 5..

So far, so good..

From time to time, I notice, when I log in on an alt, census doesn't start.. I check the slider and yes, it have changed back to 30.. I slide it to 5, where it belongs and census starts automatic.

Why does this happen? It's not just once or twice, but maybe 100-200 times, in the last few years..
I can see no real pattern in it, only that it never happens for my main..
My only guess: If it's too long time (how long he is that, then?) since a toon was last logged in, it's reset back to 30 minutes..

As Subject line says.. Nothing is broken.. System works,.. But timer is changed, and not by me..
Doing census mainly on Draenor; Raluf - Nimsay - Lusmo - Quixx - Sosyan - Garthog - Trubin - Zalistra - Zesmi and Djaang

User avatar
Forums Admin & general flunky
Posts: 1432
Joined: Fri Nov 07, 2008 1:11 pm
Location: Texas, USA

Post by bringoutyourdead »

FuxieDK you always come up with interesting issues.

[Edited.. item 3 below..]

the delay timer is, as you know, set on the options page, it is written out to the CensusPlus.lua data file by the WoW client when the character is logged out of the world.

It is in the [INFO] section of the file as shown below:
["Info"] = {
["AutoCensusTimer"] = 1800,
["LogVer"] = "7.0.6. >=WoWL7.3.0",
["CPWindow_Transparency"] = 0.5,
["AutoCensus"] = false,
["Stealth"] = false,
["PlayFinishSound"] = false,
["Verbose"] = true,
["ClientLocale"] = "enUS",
["Locale"] = "US",
["CensusButtonShown"] = true,
["Version"] = "7.0.6",
["LoginServer"] = "US",
["ChattyOptions"] = false,
["UseLogBars"] = true,
["SoundFile"] = 1,
["CensusButtonAnimi"] = true,

When a new character enters the world, the WoW client will read the file back into memory and save it in the Global data space.

CensusPlus, when it starts up, will query the global space for its variables and use the info found. If for some reason (data corruption?) the variable is not found or is in an invalid state, CensusPlus will revert that variable back to the default. For this option it is 1800 seconds.

I can think of only two (maybe three) ways the data could change without user intervention.
1 - System memory or WoW client corruption that causes the wrong or no data to be saved.
2 - Another Addon that is using the same root variable name for the data table. As the global data space is available to all functions of the client and all addons, there is a possibility for unintended interactions. This is why Blizzard warns all addon programmers to insure they chose a variable name that should be unique.
The recommendation is to use a table with a variable based on the addon name.

We do this as our Global variable is CensusPlus_
We actually use the following:

A malicious or lazy programmer could use our base code as the core for their addon and potentially overwrite our Global data (or have their Global data overwritten by CensusPlus depending on how the client decided to order the initializations.)

Early on there was a short term problem with people who used CensusPlus code sections to create the auto-guild invite addons. But it only impacted people who tried to run both addons on the same account. We got some flak from clueless people who looked at the auto invite code and assumed that since it had our variables in it that we were responsible for the annoying auto invites. Blizzard and other knowledgeable programmers knew better.

A later example of this type of problem was with WhoLib. The library was created to expand upon a common game function. The problem was that the library could not tell the difference between the results set of its call to the function and a normal user or addon call to the same function.

Considering that CensusPlus is based on making the /who calls... anyone who wanted to do CensusPlus and the addons that used Wholib were hitting a brick wall.. HARD!

Which is why the Wholib people asked Rollie to allow them to include Wholib into the CensusPlus code.

3- actually I don't think this is true/possible. I am not at a location to start up the game and check the options screen.

[Edit... how quickly I forget ... this is possible]
If per-character over-rides of the delay timer
were possible then you could get confused when alternate character are logged in with a forgotten over-ride set.
But I am fairly certain that part of the options file falls outside of the per-character over-ride matrix.TOTALLY INCORRECT.
And this becomes the most likely way you see this occurrence.

A character had an over-ride set for auto census... but the slider was not set to the same desired interval.. so it defaults to 30 minutes.

User avatar
Census Taker
Posts: 659
Joined: Thu May 22, 2008 11:36 am
Location: Copenhagen, DK

Post by FuxieDK »

bringoutyourdead wrote:FuxieDK you always come up with interesting issues.
I take pride in it..
The mundane, I leave for others ;)

1: Wouldn't that also cause a lot of corrupted uploads? I very rarely have that.

2: Unlikely.. I get all my addons via Twitch-downloader.. If addons from there are messing with variables, clearly marked for CensusPlus, I think we would have heard by now.

3: For all (main and alts alike) toons, Auto-Census is enabled, Override is "Remove Override" (which I interpret as Default), delay set to 5 minutes.
The only option where I fiddle with Override, is Verbose.... FAAAAR away from Auto-Census, so no possible mis-clicks.
Doing census mainly on Draenor; Raluf - Nimsay - Lusmo - Quixx - Sosyan - Garthog - Trubin - Zalistra - Zesmi and Djaang

Post Reply