WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   New whispers on new tabs cause UI errors and taints (https://www.wowinterface.com/forums/showthread.php?t=44883)

Animor 10-22-12 06:23 AM

New whispers on new tabs cause UI errors and taints
 
Hi,

I'm opening a new thread, since my previous has a misleading subject, and the problem seems to be global and not related only to my addon.

The behavior I have encountered is very strange: setting new whispers to be displayed on a new tab (Interface -> Social) causes LUA and UI errors. Several addons are being blamed for these errors, including DBM, bartender and more. It also happens after I disabled almost every addon I have (including my own).

1. First error is easy to reproduce: log into the game, whisper yourself so a new tab will show. Then open glyphs panel and click on a glyph from the list. A UI error will appear.

2. Second error happens on BG: enter a BG (Silvershard Mines demonstrates the best), whisper yourself so a new tab will show, then make sure to be in combat while the game updates the BG score (top-middle of the screen). Bugsack capture lua errors of the following: ArenaEnemyFrames:ClearAllPoints(), ArenaEnemyFrames:SetPoint(), ArenaPrepFrames:ClearAllPoints(), ArenaPrepFrames:SetPoint(). These are also blamed on several addons.

I wonder if these errors happen only to me, or to others as well. Perhaps my WoW installation gone mad or something, since it seems very strange indeed.

SDPhantom 10-22-12 10:33 AM

The default UI tends to taint itself a lot. When taint happens, the game engine always assumes it's from an addon and only stores an index number to tell which one. I don't know the game engine's code, but let's say when the default UI taints itself, this index gets set to 0. When the game gets to displaying an error about it, there is no addon at index 0, so to prevent a crash, it picks index 1, which is the top addon in the addon list when you look at it in the character select screen.

Shadowed 10-23-12 10:02 AM

Quote:

Originally Posted by SDPhantom (Post 267372)
The default UI tends to taint itself a lot. When taint happens, the game engine always assumes it's from an addon and only stores an index number to tell which one. I don't know the game engine's code, but let's say when the default UI taints itself, this index gets set to 0. When the game gets to displaying an error about it, there is no addon at index 0, so to prevent a crash, it picks index 1, which is the top addon in the addon list when you look at it in the character select screen.

That's not how it work, the default UI cannot taint itself. This is how taint works:

Blizzards code is blessed and carries no taint, this includes the AddOns/Blizzard_*. Addons (eg, everything else) start out as tainted. Every time an addon touches something that's untainted (Blizzard code), the part of Blizzards code you touched becomes tainted. Blizzard does not notify you about taint until it hits something that requires an untainted execution path, such as :Show() or :Hide() while in combat. Or the glyph/talent UI.

The secure templates are a mix of this. They are blessed/untainted because it's Blizzard code, but they become tainted because addons interact with them. They can temporarily ignore taint when executing, because the secure templates have a strict environment and verifies everything to make sure no monkey business is going on.

You can see this if you look at the code, such as SecureTemplates.lua which calls forceinsecure() to force taint when it's calling a custom method that's not controlled by the secure templates.

As an analogy, because everyone loves analogies: Blizzards code is blue, Addons are red. Whenever an addon (red) interacts with blizzards code (blue), Blizzards code turns red. Everything will continue executing merrily along it's way until the C engine reaches a point where it has to go "Only execute this if it's still blue, otherwise raise a taint error".

This is also how taint can spread. Because once you taint one part of the Blizzard code, it can spread to other areas if tainted Blizzard code interacts with other tainted code.

Vlad 10-23-12 10:10 AM

I wish there were more debug API added regarding fixing taint issues, those that break stuff. It is insanely annoying to attempt to figure out what broke it in the first place... cought drop down template, cough.

Shadowed 10-23-12 10:17 AM

As an addendum. The default UI can't actually taint itself. The glyph issue with _ (which was fixed already), wasn't Blizzards UI tainting itself, it was addons tainting _ which in turn tainted the glyph UI.

SDPhantom 10-23-12 11:44 AM

The main problem with Blizzard_CompactRaidFrames in most of Cataclysm was the fact it was tainting itself while trying to update in combat. There are problems in Blizzard's code, they are not the holy grail of programming by any means. :rolleyes:

I forgot many specific reasons, but Blizzard has been known to randomly blame addons in this way. In this specific occasion, when removing/disabling said addon, it just blames the next one down in the list.

Vlad 10-23-12 11:51 AM

I don't know what to make out of this now... I trust you and SDPhantom but there are two conflicting posts going on, lol.

Shadowed 10-23-12 12:17 PM

Quote:

Originally Posted by SDPhantom (Post 267481)
The main problem with Blizzard_CompactRaidFrames in most of Cataclysm was the fact it was tainting itself while trying to update in combat. There are problems in Blizzard's code, they are not the holy grail of programming by any means. :rolleyes:

I forgot many specific reasons, but Blizzard has been known to randomly blame addons in this way. In this specific occasion, when removing/disabling said addon, it just blames the next one down in the list.

When deciding which addon to blame, Blizzard uses the last addon that caused the taint.

So if addons A, B, C all taint the same thing, but C taints on PLAYER_ENTERING_WORLD while A and B taint on ADDON_LOADED, the blame will be associated to C. If you then disable C, it will blame the addon that loaded last, so if it loads A then B, B will be blamed with the taint.

Spike` 10-23-12 12:28 PM

the one still needing fixing is InterfaceOptions_AddCategory()

ahh... so many taints hehe

Animor 10-23-12 12:39 PM

Hi,

This is indeed a very educating discussion.

Did any of you manage to reproduce the UI error with the glyph I have described? Can you think of an explanation or a way to fix that?


Quote:

Originally Posted by Spike` (Post 267491)
the one still needing fixing is InterfaceOptions_AddCategory()

ahh... so many taints hehe

What taints are caused by InterfaceOptions_AddCategory()? I saw that Healbot for example removed itself from the inteface panel due to taints, and I wondered why.

SDPhantom 10-23-12 01:01 PM

Blizzard's options panel code is propagating taint into the Blizzard options side.

Rilgamon 10-23-12 01:35 PM

Quote:

Originally Posted by Shadowed (Post 267468)
As an addendum. The default UI can't actually taint itself. The glyph issue with _ (which was fixed already), wasn't Blizzards UI tainting itself, it was addons tainting _ which in turn tainted the glyph UI.

Is it fixed ? Comment 5 mentions that its still unfixed ...
http://www.wowace.com/announcements/...h-ui-taint/#c5

Shadowed 10-23-12 01:42 PM

Quote:

Originally Posted by Rilgamon (Post 267497)
Is it fixed ? Comment 5 mentions that its still unfixed ...
http://www.wowace.com/announcements/...h-ui-taint/#c5

The _'s that were leaking were closed last I looked. Taint issues at this point would be addons specifically tainting the glyph UI, rather than indirectly tainting it through tainting _.


All times are GMT -6. The time now is 01:35 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI