Who window
Who window
Since installing the latest version of Census+, whenever I do a /who of someone, the window always pops up instead of simply in the chat window.
Intended? Bug? Something not configured right on my end? ISIS doing this?
Intended? Bug? Something not configured right on my end? ISIS doing this?
- bringoutyourdead
- Forums Admin & general flunky
- Posts: 1432
- Joined: Fri Nov 07, 2008 1:11 pm
- Location: Texas, USA
It is a bug in a support library used by CensusPlus and other addon's.
We have submitted a bug report to the library maintainer with a fix... but no updates have been issued at this time.
If you are comfortable using Notepad or other pure text editor the fix is very easy.
see esiemiat's message at http://www.warcraftrealms.com/forum/vie ... php?t=6059
We have submitted a bug report to the library maintainer with a fix... but no updates have been issued at this time.
If you are comfortable using Notepad or other pure text editor the fix is very easy.
see esiemiat's message at http://www.warcraftrealms.com/forum/vie ... php?t=6059
Unfortunately, that did not fix the problem. The Who window still comes up.bringoutyourdead wrote:It is a bug in a support library used by CensusPlus and other addon's.
We have submitted a bug report to the library maintainer with a fix... but no updates have been issued at this time.
If you are comfortable using Notepad or other pure text editor the fix is very easy.
see esiemiat's message at http://www.warcraftrealms.com/forum/vie ... php?t=6059
- bringoutyourdead
- Forums Admin & general flunky
- Posts: 1432
- Joined: Fri Nov 07, 2008 1:11 pm
- Location: Texas, USA
- bringoutyourdead
- Forums Admin & general flunky
- Posts: 1432
- Joined: Fri Nov 07, 2008 1:11 pm
- Location: Texas, USA
Oh wait.. sorry about that.. wrong bug.
Unfortunately that is a design flaw (in my opinion) {or possibly an implementation flaw} in the wholib library.
There is a user choice fix that would revert CensusPlus to not using the library,
but that would mean the user would have to choose to not use certain other addons that also use the Blizzard API access to the /who function.
Known addons that use the /who function and wholib - WIM, Prat, MorgDKP2(inactive?) and 12 others that seem to be inactive/abandoned.
If you choose to revert to direct api and not wholib, you will not want to run these other addons... if you do it is your problem not any of the addon maintainers.
How to make this change in CensusPlus
in code starting at line 86 .. change in line 89 from: local CensusPlus_WHOPROCESSOR = CP_libwho to: local CensusPlus_WHOPROCESSOR = CP_api
.. remember use pure text editor such as Notepad or better yet Notepad++
Background history (to help understand what is going on.)
Blizzard, World of Warcraft and addons.
Much of World of Warcraft client is written using the Lua scripting programming language.
Much of the code used by the client is open for viewing using resources that Blizzard provides.
Some of the code is encrypted (see the Blizzard files in your INTERFACE folder).
While Blizzard doesn't tell us exactly how the open code is used,
smart game players who are also very good programmers have figured out much of the code including the Application Programming Interface (API) to the lower level functions.
See http://wowprogramming.com/ if interested.
The API of interest to us is the /who function.
Most game functions work strictly on the client and don't need any resources from the Blizzard servers.
/who is in the other class that every query requires a response from Blizzard servers.. this means it has an impact on not just the local user but the whole Blizzard network.
Like a single mosquito bite, a single /who call is a hardly noticeable action, but a large enough swarm of bites/calls and you drop dead from lack of blood/resources.
This is why Blizzard has implemented a throttle for this API call and possibly why Rollie implemented an even longer duration throttle in CensusPlus.
I don't know if he had been contacted by Blizzard, but I do believe firmly that CensusPlus is one of, if not the, largest user of this resource and Blizzard has to have noticed that fact.
The throttling was removed from CensusPlus as wholib handles that resource management.
CensusPlus was restructured to not issue a new query until either the last query was answered or a time-out failure occurs.
Why Wholib
The game client by design can't run into a resource conflict with the /who function.
But you can hit conflicts when you add in apparent parallel processing with addon scripts..(not really it is all time sliced, but the effect is the same.)
Wholib was created to act as a gateway to control multiple requested access to a limited resource.
To allow multiple /who requesters to live together on the same client.
The first few attempts at wholib were good tries by not well thought out... they had issues.
LibWho2.0 was the first (and current) version to get almost everything correct, but there is a design/implementation flaw in my opinion.
What Wholib does
The library creators had two goals in mind when they created the library.
The first was the queuing gateway feature.
The second was caching previous query results to limit the need to wait for a response from the server.
{A feature CensusPlus does not use, cache bad, current real time good!}
This caching is handled via a :UserInfo sub-call.. and if it failed to return data from cache then another sub-call :Who is invoked,
The :Who sub-call is what CensusPlus depends on and so do all normal user calls to the /who function.
What has gone wrong with Wholib
The Wow client by default handles who queries as follows:
if result list is 0-3 return names then display in chat window, if larger then 3 then open friends (who) display window.
This behavior (or behaviour for you Brits) can be modified with a logic switch to force all results to the friends display window.
{and then if you are sneaky you can force that window to not display... which is what we do with CensusPlus}
Wholib to handle the gateway function for various types of requesters creates three queues : User (the default), Quite (for addons), Scanning (for addons that hit /who a lot).
CensusPlus should be using the Scanning queue (lower priority)... but per documentation the library code to differentiate Quite and Scanning was never finished.
The User queue is suppose to be set at the default display behavior and the other queues allow the query request to set the display switch as needed.
Unfortunately the logic for display switch setting is bugged.. it always forces to friends window and then fails to block the display (which I guess is a good thing actually.)
There appear to be other issues where default /who handling is ... hmmm mis-handled by the library.
Default who calls from Blizzard or the user should be handled strictly as a pass through in my mind.. instead the library wants to do too much with the calls.
{That is a design philosophy issue and I suppose either way could be argued successfully.}
A long wall of text.. most will ignore.. but if you got all the way to the end.. here is how it all works..
https://www.youtube.com/watch?v=hP4S6V_1JQU
Unfortunately that is a design flaw (in my opinion) {or possibly an implementation flaw} in the wholib library.
There is a user choice fix that would revert CensusPlus to not using the library,
but that would mean the user would have to choose to not use certain other addons that also use the Blizzard API access to the /who function.
Known addons that use the /who function and wholib - WIM, Prat, MorgDKP2(inactive?) and 12 others that seem to be inactive/abandoned.
If you choose to revert to direct api and not wholib, you will not want to run these other addons... if you do it is your problem not any of the addon maintainers.
How to make this change in CensusPlus
in code starting at line 86 .. change in line 89 from: local CensusPlus_WHOPROCESSOR = CP_libwho to: local CensusPlus_WHOPROCESSOR = CP_api
.. remember use pure text editor such as Notepad or better yet Notepad++
Code: Select all
local CP_libwho = "libwho"
local CP_api = "api"
local CP_letterselect = 0 -- default letter selector pattern... valid options 1 and 2.. testing only
local CensusPlus_WHOPROCESSOR = CP_libwho -- default processing of who request to full wholib CP_api --
Blizzard, World of Warcraft and addons.
Much of World of Warcraft client is written using the Lua scripting programming language.
Much of the code used by the client is open for viewing using resources that Blizzard provides.
Some of the code is encrypted (see the Blizzard files in your INTERFACE folder).
While Blizzard doesn't tell us exactly how the open code is used,
smart game players who are also very good programmers have figured out much of the code including the Application Programming Interface (API) to the lower level functions.
See http://wowprogramming.com/ if interested.
The API of interest to us is the /who function.
Most game functions work strictly on the client and don't need any resources from the Blizzard servers.
/who is in the other class that every query requires a response from Blizzard servers.. this means it has an impact on not just the local user but the whole Blizzard network.
Like a single mosquito bite, a single /who call is a hardly noticeable action, but a large enough swarm of bites/calls and you drop dead from lack of blood/resources.
This is why Blizzard has implemented a throttle for this API call and possibly why Rollie implemented an even longer duration throttle in CensusPlus.
I don't know if he had been contacted by Blizzard, but I do believe firmly that CensusPlus is one of, if not the, largest user of this resource and Blizzard has to have noticed that fact.
The throttling was removed from CensusPlus as wholib handles that resource management.
CensusPlus was restructured to not issue a new query until either the last query was answered or a time-out failure occurs.
Why Wholib
The game client by design can't run into a resource conflict with the /who function.
But you can hit conflicts when you add in apparent parallel processing with addon scripts..(not really it is all time sliced, but the effect is the same.)
Wholib was created to act as a gateway to control multiple requested access to a limited resource.
To allow multiple /who requesters to live together on the same client.
The first few attempts at wholib were good tries by not well thought out... they had issues.
LibWho2.0 was the first (and current) version to get almost everything correct, but there is a design/implementation flaw in my opinion.
What Wholib does
The library creators had two goals in mind when they created the library.
The first was the queuing gateway feature.
The second was caching previous query results to limit the need to wait for a response from the server.
{A feature CensusPlus does not use, cache bad, current real time good!}
This caching is handled via a :UserInfo sub-call.. and if it failed to return data from cache then another sub-call :Who is invoked,
The :Who sub-call is what CensusPlus depends on and so do all normal user calls to the /who function.
What has gone wrong with Wholib
The Wow client by default handles who queries as follows:
if result list is 0-3 return names then display in chat window, if larger then 3 then open friends (who) display window.
This behavior (or behaviour for you Brits) can be modified with a logic switch to force all results to the friends display window.
{and then if you are sneaky you can force that window to not display... which is what we do with CensusPlus}
Wholib to handle the gateway function for various types of requesters creates three queues : User (the default), Quite (for addons), Scanning (for addons that hit /who a lot).
CensusPlus should be using the Scanning queue (lower priority)... but per documentation the library code to differentiate Quite and Scanning was never finished.
The User queue is suppose to be set at the default display behavior and the other queues allow the query request to set the display switch as needed.
Unfortunately the logic for display switch setting is bugged.. it always forces to friends window and then fails to block the display (which I guess is a good thing actually.)
There appear to be other issues where default /who handling is ... hmmm mis-handled by the library.
Default who calls from Blizzard or the user should be handled strictly as a pass through in my mind.. instead the library wants to do too much with the calls.
{That is a design philosophy issue and I suppose either way could be argued successfully.}
A long wall of text.. most will ignore.. but if you got all the way to the end.. here is how it all works..
https://www.youtube.com/watch?v=hP4S6V_1JQU
- bringoutyourdead
- Forums Admin & general flunky
- Posts: 1432
- Joined: Fri Nov 07, 2008 1:11 pm
- Location: Texas, USA
grrr... got distracted and deleted this message before it was submitted.
And Grrr is how I'm feeling about wholib at this time.
If it weren't for the WIM addon I would revert back to the addon unfriendly direct API calls to /who.
I spent more then a day looking over the other addons that are claimed to be users of the libwho2.0 library and the library itself and have determined the following.
Only 2 other addons besides CensusPlus use the library.
WIM v3 which has 2 of the libwho2.0 authors as supporting authors does make optional use of the library.
But only if 1 specific module of WIM is enabled and configured to do so.
PRAT 3.0 is managed by the manger of libwho 2.0... but I just noticed that PRAT is now listed as maintained by another.
A situation just like CensusPlus where Rollie is still listed as manager.\
Oddly enough PRAT has the wholib as an optional dependency.. in fact it is so optional that it isn't even listed in the .TOC.
If another addon has invoked wholib or the user had added that library as a standalone addon PRAT will use it.. otherwise it could care less.
While Sylvanaar still appears to be active at wowace.com, there hasn't been any response from the various error tickets and comments for libwho 2.0.
So.. shudder... I got down and dirty with a total different programming style to try to figure out why in default /who usage the library is forcing the friends window to display with the results.
After modifying my copy of CensusPlus to invoke wholib debug mode.
(wholib is a load on demand library.. and it needs something to demand its startup.)
And adding a lot more debug statements to the code.. I have determined that YES Wholib incorrectly handles default user started /who calls.
After getting everything setup.. I did a /who I_See_Right_in_front_of_me_charactername.
debugging noted:
manual invocation of /who
query added to correct queue
INSTANT priority
WhoToUI switch correctly set to display to chat window.
Query sent to server.... and the processer of the 3 queues continues looking for work.
!!!!! WhoToUI switch has been flipped to Friends window !!!!
Server has returned result
displays the data... in the pop up window... grrr.
query has finished processing
WhoToUI state switched back to default ... grrr.
I haven't yet determined were the back switch flip command happens.
Running CensusPlus ceneus run with the library debug makes Verbose mode look sparse, talk about chatty mode!!!
But I was able to see that yes as we know when in addon mode.. the libwho 2.o library works as it is suppose to.
And Grrr is how I'm feeling about wholib at this time.
If it weren't for the WIM addon I would revert back to the addon unfriendly direct API calls to /who.
I spent more then a day looking over the other addons that are claimed to be users of the libwho2.0 library and the library itself and have determined the following.
Only 2 other addons besides CensusPlus use the library.
WIM v3 which has 2 of the libwho2.0 authors as supporting authors does make optional use of the library.
But only if 1 specific module of WIM is enabled and configured to do so.
PRAT 3.0 is managed by the manger of libwho 2.0... but I just noticed that PRAT is now listed as maintained by another.
A situation just like CensusPlus where Rollie is still listed as manager.\
Oddly enough PRAT has the wholib as an optional dependency.. in fact it is so optional that it isn't even listed in the .TOC.
If another addon has invoked wholib or the user had added that library as a standalone addon PRAT will use it.. otherwise it could care less.
While Sylvanaar still appears to be active at wowace.com, there hasn't been any response from the various error tickets and comments for libwho 2.0.
So.. shudder... I got down and dirty with a total different programming style to try to figure out why in default /who usage the library is forcing the friends window to display with the results.
After modifying my copy of CensusPlus to invoke wholib debug mode.
(wholib is a load on demand library.. and it needs something to demand its startup.)
And adding a lot more debug statements to the code.. I have determined that YES Wholib incorrectly handles default user started /who calls.
After getting everything setup.. I did a /who I_See_Right_in_front_of_me_charactername.
debugging noted:
manual invocation of /who
query added to correct queue
INSTANT priority
WhoToUI switch correctly set to display to chat window.
Query sent to server.... and the processer of the 3 queues continues looking for work.
!!!!! WhoToUI switch has been flipped to Friends window !!!!
Server has returned result
displays the data... in the pop up window... grrr.
query has finished processing
WhoToUI state switched back to default ... grrr.
I haven't yet determined were the back switch flip command happens.
Running CensusPlus ceneus run with the library debug makes Verbose mode look sparse, talk about chatty mode!!!
But I was able to see that yes as we know when in addon mode.. the libwho 2.o library works as it is suppose to.
- bringoutyourdead
- Forums Admin & general flunky
- Posts: 1432
- Joined: Fri Nov 07, 2008 1:11 pm
- Location: Texas, USA
FOUND the wholib bug....
Since this code isn't being maintained well... it never got a complete a complete conversion for the 0/1 -> False/True syntax that Blizzard did with v6.0 release.
I got a single who character to go to chat window..
but it is late... tomorrow I will continue now that I know the class of problem we are looking at.
Since this code isn't being maintained well... it never got a complete a complete conversion for the 0/1 -> False/True syntax that Blizzard did with v6.0 release.
I got a single who character to go to chat window..
but it is late... tomorrow I will continue now that I know the class of problem we are looking at.
- bringoutyourdead
- Forums Admin & general flunky
- Posts: 1432
- Joined: Fri Nov 07, 2008 1:11 pm
- Location: Texas, USA
For those who have the skills and desire the lines to fix in libwho-2.0.lua are 77 & 471
lib.SetWhoToUIState = 0
should be
lib.SetWhoToUIState = false
and
self.hooked.SetWhoToUI(args.gui and 1 or 0)
should be
self.hooked.SetWhoToUI(args.gui and true or false)
Remember if you are running both CensusPlus and WIM to make the changes in both copies of libwho... there is no way to know which copy will load first and be the active copy.
this has been sent to the libwho people.
And I even escalated it by sending a PM to the project manager.
It was a friendly PM I included the words Please and Thanks.... and noted my frustrations.

lib.SetWhoToUIState = 0
should be
lib.SetWhoToUIState = false
and
self.hooked.SetWhoToUI(args.gui and 1 or 0)
should be
self.hooked.SetWhoToUI(args.gui and true or false)
Remember if you are running both CensusPlus and WIM to make the changes in both copies of libwho... there is no way to know which copy will load first and be the active copy.
this has been sent to the libwho people.
And I even escalated it by sending a PM to the project manager.
It was a friendly PM I included the words Please and Thanks.... and noted my frustrations.
