Quantcast WoWInterface - View Single Post - Who wants to drink from the firehose?
View Single Post
01-29-13, 08:51 AM   #7
nUI's Author
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
I'm at work at the moment, so I can't give you a full response. That said, the easiest example I can think of was the BattlefieldMinimap.... in my code I had something to the effect of...


-- blah blah blah stuff to manipulate the size and position of the map

That looks innocent enough on the face of it. But, in my doing so, I tainted the battlefield minimap. Specifically, when you call BattlefieldMinimap:StopMovingOrSizing() that triggers a call, eventually, to BattlefieldMinimap_OnUpdate() [if memory serves me correctly] which, in turn, sets the value of BATTLEFIELD_MINIMAP_NUM_OVERLAYS [again. operating from memory] which is read during combat lockdown in battlegrounds and a host of other places.

Using the taintlog 11 mode, I was able to work out that I was tainting BATTLEFIELD_MINIMAP_NUM_OVERLAYS (which I never knew before) and working backwards in the taint.log I found that it was the call to StopMovingOrSizing() that did it -- something I never, in a million years, would have guessed just reading through my code. More surprising was the fact that is was this taint of the BATTLEFIELD_MINIMAP_NUM_OVERLAYS that was causing me to throw combat taint errors on my action bar buttons whenever the secure action button code tried to call ActionButton_Update() it would throw a combat taint on the ActionButton:Show() function.

Who would have guessed that my action buttons were failing because I called BattlefieldMinimap:StopMovingOrSizing() ??

As for how I fixed it... rather than use the StartMoving(), StartSizing() and StopMovingOrSizing() methods, I pulled the relevant bits I needed out of the BattlefieldMinimap.lua code and replicated them in my own code, while avoiding setting any globals within the Battlefield Minimap code base.

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.

Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
  Reply With Quote