WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   UI Error - (Compact Raid Frame) (https://www.wowinterface.com/forums/showthread.php?t=45034)

Angrysteel 11-01-12 02:19 PM

UI Error - (Compact Raid Frame)
 
Code:

Message: CreateFrame: Can't create protected 'Button' now
Time: 11/01/12 14:04:09
Count: 2
Stack: [C]: ?
[C]: ?
[C]: in function `CreateFrame'
...actRaidFrames\Blizzard_CompactRaidFrameContainer.lua:342: in function `CompactRaidFrameContainer_GetUnitFrame'
...actRaidFrames\Blizzard_CompactRaidFrameContainer.lua:314: in function `CompactRaidFrameContainer_AddUnitFrame'
...actRaidFrames\Blizzard_CompactRaidFrameContainer.lua:254: in function `CompactRaidFrameContainer_AddPlayers'
...actRaidFrames\Blizzard_CompactRaidFrameContainer.lua:176: in function `CompactRaidFrameContainer_LayoutFrames'
...actRaidFrames\Blizzard_CompactRaidFrameContainer.lua:130: in function `CompactRaidFrameContainer_TryUpdate'
...actRaidFrames\Blizzard_CompactRaidFrameContainer.lua:57: in function `CompactRaidFrameContainer_OnEvent'
[string "*:OnEvent"]:1: in function <[string "*:OnEvent"]:1>

Locals: (*temporary) = "Button"
(*temporary) = "CompactRaidFrame3"
(*temporary) = CompactRaidFrameContainer {
 unitFrameUnusedFunc = <function> defined @Interface\AddOns\Blizzard_CompactRaidFrames\Blizzard_CompactRaidFrameContainer.lua:46
 flowSortFunc = <function> defined @Interface\AddOns\Blizzard_CompactRaidFrames\Blizzard_CompactRaidFrameManager.lua:762
 groupMode = "flush"
 raidUnits = <table> {
 }
 frameUpdateList = <table> {
 }
 flowOrientation = "vertical"
 borderFrame = CompactRaidFrameContainerBorderFrame {
 }
 flowFilterFunc = <function> defined @Interface\AddOns\Blizzard_CompactRaidFrames\Blizzard_CompactRaidFrameManager.lua:830
 groupFilterFunc = <function> defined @Interface\AddOns\Blizzard_CompactRaidFrames\Blizzard_CompactRaidFrameManager.lua:860
 partyUnits = <table> {
 }
 flowMaxPrimaryUsed = 72.000001094068
 flowMaxSecondaryUsed = 35.999985230089
 units = <table> {
 }
 flowPauseUpdates = true
 enabled = true
 frameReservations = <table> {
 }
 flowFrames = <table> {
 }
 0 = <userdata>
}
(*temporary) = "CompactUnitFrameTemplate"

Is this a blizzard error, or an addon creating these errors? I am having the hardest time tracking this down.

It looks like its just the default Blizzard Raid frames erroring. I have tried deleting the Blizzard CompactRaidFrames.lua file and letting blizzard create a new one. Still same errors.

Phanx 11-01-12 04:05 PM

Blizzard's CompactRaidFrames are probably the worst code they have ever included in the WoW UI. It's even worse than the UIDropDownMenu.

Technically the problem you're seeing is caused by addons -- because taint cannot occur if no addons are present -- but realistically, it's likely that none of your addons are actually doing anything wrong, and something somewhere just touched a variable that, 1500 indirect links in some nebulous chain of unrelated actions later, the CompactRaidFrames decided was tainted.

If the errors don't noticably break anything, just ignore them. Install BugSack so they don't pop up and annoy you.

If you can consistently reproduce the problem (eg. it happens every time you enter combat, or something like that) then you could try narrowing it down:

1. Enable half of your addons, disable the other half, and log in.
3. If the problem does not occur, log out, disable all enabled addons, and enable the other half.
4. If the problem does occur, log out, disable half of the enabled addons, and log in.
5. Repeat until you have narrowed it down to 1 addon that causes the problem.

VincentSDSH 03-21-13 08:31 AM

I know this is an old thread but for those searching this error:

http://us.battle.net/wow/en/forum/to...1970?page=1#15

To reproduce:
Quote:

1. Disable all addons. All of them.
2. /console taintLog 1
3. /reload
4. Copy-paste this to chat:

/run local frame=CreateFrame("Frame","TaintTest") frame.name="Taint Test" InterfaceOptions_AddCategory(frame)

5. Go enter combat. I recommend using a target dummy and just auto attacking for a more pure test. (/run and /script macros have the same taint potential as addons)
6. While in combat hit ESC->Interface
7. Close the window
8. BAM! You've just added 8k to your taint.log. The major events in the log are:
Verified this is still an issue in 5.2.

Phanx 03-21-13 01:59 PM

Oh, so that's the taint bug with InterfaceOptions_AddToCategory. Well, I guess I can stop telling myself I should get around to looking into why I get so many "omg an addon tainted the compact raid frames you're not even using!" errors in BugSack. :rolleyes:

Nibelheim 03-21-13 02:08 PM

Wish Blizzard didn't have optionphobia and added in an option to not load their raid frames.

Phanx 03-21-13 02:59 PM

I wonder if something like this would solve all the problems (for people not using the Blizzard raid frames)?

Code:

CompactRaidFrameContainer:UnregisterAllEvents()
CompactRaidFrameContainer:SetScript("OnEvent", nil)
CompactRaidFrameContainer:SetScript("OnSizeChanged", nil)
CompactRaidFrameContainer:Hide()

CompactRaidFrameManager:UnregisterAllEvents()
CompactRaidFrameManager:SetScript("OnEvent", nil)
CompactRaidFrameManager:Hide()


Nibelheim 03-22-13 08:56 AM

Quote:

Originally Posted by Phanx (Post 274976)
I wonder if something like this would solve all the problems (for people not using the Blizzard raid frames)?

I ran WoW with a lone addon with that code in it [plus an additional LoadAddOn("Blizzard_CompactRaidFrames")]. The Blizz Raid Frames still appeared after going into the Interface Options window then leaving the Interface Options window, but never disappeared on leaving a raid or showed more than one column in a raid.

Not sure why entering/leaving Interface Options causes the Raid Frames to load, but it's a good way to test code functionality.

VincentSDSH 03-22-13 11:29 AM

The only "solution" I found to deal with this abject stupidity was to code !BugGrabber to ignore blocked actions on CompactRaidFrame*

The upside of that is that when errors Fatality in BugSack, they're real problems; the downside is realizing how many addons have issues in 5.2, which are irregularly related to what appears to be timing issues with the server.

I'm starting to expect the next expansion to be "Attack of the Interns" where our daily quest is to debug blizzard's code.

Phanx 03-23-13 07:43 PM

Quote:

Originally Posted by Nibelheim (Post 275037)
The Blizz Raid Frames still appeared after going into the Interface Options window then leaving the Interface Options window...

Weird. I've never seen that happen. Try adding:

Code:

local function HideSafely(f) if not InCombatLockdown() then f:Hide() end
CompactRaidFrameContainer:HookScript("OnShow", HideSafely)
CompactRaidFrameManager:HookScript("OnShow", HideSafely)

If they even appear while opening the Interface Options in combat, you might need to add a frame to listen for the end of combat and hide them.

Code:

local combatHider = CreateFrame("Frame")
combatHider:SetScript("OnEvent", function(f, e)
    if InCombatLockdown() then return end
    CompactRaidFrameContainer:Hide()
    CompactRaidFrameManager:Hide()
    f:UnregisterEvent(e)
end

local function HideSafely(f)
    if InCombatLockdown() then
        combatHider:RegisterEvent("PLAYER_REGEN_ENABLED")
    else
        -- maybe do f:SetAlpha(0) here, though it will still be clickable...
        f:Hide()
    end
end

CompactRaidFrameContainer:HookScript("OnShow", HideSafely)
CompactRaidFrameManager:HookScript("OnShow", HideSafely)

Quote:

Originally Posted by VincentSDSH (Post 275045)
... how many addons have issues in 5.2, which are irregularly related to what appears to be timing issues with the server.

I currently have 218 items in my AddOns folder, and I haven't seen a real error (eg. not fake taint errors) from anything other than my own addons while I'm doing development. o_O

pelf 03-23-13 09:32 PM

Hmm, now that you mention that: somebody must have already coded a "hide and destroy/keep dead the raid frames" thing? I wonder how my unit frames do it...

Code:

--Disable the creation of blizz CompactRaidFrameX, theres an issue with taint due to dropdown with more 7 items
--From http://www.wowinterface.com/forums/showpost.php?p=261589&postcount=5
       
if (rconf.enable and CompactUnitFrameProfiles) then
        --CompactRaidFrameManager:SetParent(self)
        CompactUnitFrameProfiles:UnregisterAllEvents()--This disables the creation of the blizzard raid frames
end

Like that, I guess.

10leej 03-23-13 09:51 PM

Why you people hating on the blizzard raid frames so much their simply amazing. Never cause an issue or anything until you try to do something completely unrelated to the raid frames and then you spend the next 4 weeks debug perfectly fine code only to see what's really going on and then you go, "aww"

Quote:

I'm starting to expect the next expansion to be "Attack of the Interns" where our daily quest is to debug blizzard's code.
I actually would not mind this if Blizzard decided to allow us to fix the default UI, that thing would be perfect the next day an I wouldn't have near the problems with it I have now.

pelf 03-23-13 09:59 PM

Quote:

Originally Posted by 10leej (Post 275110)
Never cause an issue or anything until you try to do something completely unrelated to the raid frames and then you spend the next 4 weeks debug perfectly fine code only to see what's really going on and then you go, "aww"

Almost sounds like that actually happened :(.

10leej 03-23-13 10:08 PM

Quote:

Originally Posted by pelf (Post 275112)
Almost sounds like that actually happened :(.

It was my most recent experience when trying my hand at an in game configuration (not even sure why I even tried it honestly I hate in game config).

218 addon Phanx? really? I only use..... 2 (yes there are more addon in my UI download than what I actually use, lmao)

Phanx 03-24-13 02:36 AM

1 Attachment(s)
Quote:

Originally Posted by pelf (Post 275109)
Like that, I guess.

Looks promising. Just unregistering events on CompactUnitFramesProfiles stops the frames from working? What about the events registered to CompactRaidFrameContainer and CompactRaidFrameManager in their OnLoad scripts?

Quote:

Originally Posted by 10leej (Post 275110)
Why you people hating on the blizzard raid frames so much their simply amazing.

They're really ugly, and severly lacking in customization, and it's just easier to write a whole new addon (or keep using a whole new addon that I've been using/developing for many years before Blizzard added their raid frames) than to try to hook into the Blizzard frames without tainting them.

Quote:

Originally Posted by 10leej (Post 275113)
218 addon Phanx? really? I only use..... 2 (yes there are more addon in my UI download than what I actually use, lmao)

Okay, I dumped a list to a text file and removed all the extra folders (MogIt has 10 folders, for example) and addons that I don't use often enough to count, leaving 147 actual addons that I use regularly. It seems like a lot, but most of them are small quality-of-life tweaks that I don't really notice in operation but definitely notice when they're not there. See attached list.

(For anyone looking at this list and thinking "ooh, PhanxBorder sounds really neat", please don't PM me asking about any addons marked as PRIVATE. They're not published and I have no plans to publish them. PMing me isn't going to change my mind. Go write your own.)

pelf 03-24-13 02:51 AM

Quote:

Originally Posted by Phanx (Post 275115)
Looks promising. Just unregistering events on CompactUnitFramesProfiles stops the frames from working? What about the events registered to CompactRaidFrameContainer and CompactRaidFrameManager in their OnLoad scripts?

Well, when I said "my unit frames" I meant "the unit frames I use". That code is from X-Perl. There was a point in time when the little expandy button for the raid controls kept showing back up, but I haven't seen it in ages now. If what they're doing does work, I guess the profiles actually spawn/create/show the frames? I will mention, though, that if you click Interface > Game > Raid Profiles it throws this error:

Code:

1x Blizzard_CompactUnitFrameProfiles.lua:462: Usage: GetRaidProfileOption("profile", "optionName")
<in C code>
Blizzard_CompactUnitFrameProfiles.lua:462: in function "initFunction"
FrameXML\UIDropDownMenu.lua:69: in function "UIDropDownMenu_Initialize"
Blizzard_CompactUnitFrameProfiles.lua:450: in function "CompactUnitFrameProfilesDropdown_OnShow"
<string>:"*:OnShow":1: in function <string>:"*:OnShow":1
<in C code>
FrameXML\InterfaceOptionsFrame.lua:28: in function "InterfaceOptionsList_DisplayPanel"
FrameXML\InterfaceOptionsFrame.lua:46: in function "InterfaceOptionsListButton_OnClick"
<string>:"*:OnClick":2: in function <string>:"*:OnClick":1

Also, once that error is thrown, the whole interface options crashes as soon as you click Interface under Game Menu and doesn't work until a reload :). I assume the two are related.

So, as is the style of X-Perl, it appears to work, but isn't very refined. I've just been using it for so long now (Nymbia's Perl before X-) that I don't even want to bother with anything else.

Phanx 03-24-13 03:23 AM

Hmm... what if you disabled the Raid Profiles panel in the Interface Options window so it couldn't be clicked?

Code:

local buttons = InterfaceOptionsFrameCategories.buttons
for i = 1, #buttons do
    buttons[i]:SetDisabledFontObject(GameFontDisable)
end
hooksecurefunc("InterfaceCategoryList_Update", function()
    for i = 1, #buttons do
        buttons[i]:SetEnabled(buttons[i]:GetText() ~= COMPACT_UNIT_FRAME_PROFILES_LABEL)
    end
end)


pelf 03-24-13 11:02 AM

Quote:

Originally Posted by Phanx (Post 275118)
Hmm... what if you disabled the Raid Profiles panel in the Interface Options window so it couldn't be clicked?

That's probably reasonable. I wonder if the information about what happens to the profiles page is posted anywhere...

Do you want me to try that?

Phanx 03-24-13 02:52 PM

The solution Leatrix posted is cleaner, but I've been running a mini-addon with your solution + that code I posted disabling the Raid Profiles panel from being clicked, and haven't seen any of the usual taint errors in BugSack.

Edit:
Since Leatrix has deleted his entire forum posting history for some (annoying) reason, here is the code he had posted to resolve the issue discussed in this thread by removing the Cancel button from the Interface Options window:

Code:

-- Remove the cancel button
InterfaceOptionsFrameCancel:Hide()
InterfaceOptionsFrameOkay:SetAllPoints(InterfaceOptionsFrameCancel)

-- Make clicking cancel the same as clicking okay
InterfaceOptionsFrameCancel:SetScript("OnClick", function()
        InterfaceOptionsFrameOkay:Click()
end)


Nibelheim 03-24-13 03:01 PM

Quote:

Originally Posted by Phanx (Post 275115)
What about the events registered to CompactRaidFrameContainer and CompactRaidFrameManager in their OnLoad scripts?

Speaking of; does unregistering the events on CUFProfiles result in these two frames no longer loading at all, thus never registering their own events?

pelf 03-24-13 10:09 PM

Quote:

Originally Posted by Nibelheim (Post 275153)
Speaking of; does unregistering the events on CUFProfiles result in these two frames no longer loading at all, thus never registering their own events?

That has been my guess as to how that is working.


All times are GMT -6. The time now is 05:33 AM.

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