Error after checking my spellbook while fighting a monster
Nillx opened this issue ยท 3 comments
I feel like an error magnet at this point :D Got this error after checking which spells im missing. Using this addon: https://www.wowinterface.com/downloads/info25031-WhatsTraining.html
1x [ADDON_ACTION_BLOCKED] AddOn 'ButterQuestTracker' tried to call the protected function 'SpellButton2:Show()'.
!BugGrabber\BugGrabber.lua:519: in function <!BugGrabber\BugGrabber.lua:519>
[C]: in function `Show'
FrameXML\SpellBookFrame.lua:185: in function `SpellBookFrame_UpdateSpells'
FrameXML\SpellBookFrame.lua:769: in function `SpellBook_UpdatePlayerTab'
FrameXML\SpellBookFrame.lua:14: in function `tabUpdate'
FrameXML\SpellBookFrame.lua:160: in function <FrameXML\SpellBookFrame.lua:112>
[C]: in function `SpellBookFrame_Update'
FrameXML\SpellBookFrame.lua:97: in function <FrameXML\SpellBookFrame.lua:96>
[C]: in function `Show'
FrameXML\UIParent.lua:2078: in function `SetUIPanel'
FrameXML\UIParent.lua:1923: in function `ShowUIPanel'
FrameXML\UIParent.lua:1784: in function <FrameXML\UIParent.lua:1780>
[C]: in function `SetAttribute'
FrameXML\UIParent.lua:2526: in function `ShowUIPanel'
FrameXML\SpellBookFrame.lua:46: in function `ToggleSpellBook'
[string "TOGGLESPELLBOOK"]:1: in function <[string "TOGGLESPELLBOOK"]:1>
Locals:
InCombatSkipped
Got this one after checking the default blizzard spellbook
1x [ADDON_ACTION_BLOCKED] AddOn 'ButterQuestTracker' tried to call the protected function 'SpellButton2:Enable()'.
!BugGrabber\BugGrabber.lua:519: in function <!BugGrabber\BugGrabber.lua:519>
[C]: in function `Enable'
FrameXML\SpellBookFrame.lua:493: in function `SpellButton_UpdateButton'
FrameXML\SpellBookFrame.lua:271: in function `SpellButton_OnEvent'
[string "*:OnEvent"]:1: in function <[string "*:OnEvent"]:1>
Locals:
InCombatSkipped
So I literally just spent the past hour debugging this and I'm going to attempt to explain what the issue was in an attempt to retain my sanity.
However first I thought I'd let you know that this issue should be resolved in 1.9.0-rc.4.
Now onto the ramblings of a mad man!
Basically the specific line of code causing the problem was here...
More specifically the issue was with the default values I was passing up here...
ButterQuestTracker/TrackerHelper/Modules/Font.lua
Lines 21 to 22 in 4d623fa
These values contain rgb values, but they also contain a whole bunch of functions.
I'm guessing it had something to do with how WoWs UIFrameCache reuses frames in conjunction with this fact that was causing the problem.
After digging into it further I'm convinced it's because of the rgb assignments (value.r = value.r or 0.0
) I had in that function. Basically I was updating the globally shared color variables Blizzard provides NORMAL_FONT_COLOR
and HIGHLIGHT_FONT_COLOR
.
When the spellbook tried to access these modified variables it ended up causing problems.
Upon updating the output of _normalizeColor
..
ButterQuestTracker/TrackerHelper/Modules/Base.lua
Lines 37 to 48 in 8beae4e
To instead only return the rgba values...
ButterQuestTracker/TrackerHelper/Modules/Base.lua
Lines 45 to 58 in 4d623fa
The issue magically went away.
The issue went away because we're returning a new object / table.
Now you may be asking yourself, how in the world did you figure that out?
Simply by commenting out segments of the code and narrowing down where the issue was.