Key Master

Key Master

89.8k Downloads

'KeyMaster' tried to call the protected function 'KM_PlayerRow1:Show()'

linaori opened this issue ยท 7 comments

commented

Describe the bug
When completing Nokhud I got this error, triggered the moment the boss died and the key finished.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Nokhud
  2. Annihilate the Nokhud
  3. Finish the key

Expected behavior
No errors

Additional context
Seems similar to #27

1x [ADDON_ACTION_BLOCKED] AddOn 'KeyMaster' tried to call the protected function 'KM_PlayerRow1:Show()'.
[string "@!BugGrabber/BugGrabber.lua"]:485: in function <!BugGrabber/BugGrabber.lua:485>
[string "=[C]"]: in function `Show'
[string "@KeyMaster/Core/UI/PartyFrameMapping.lua"]:18: in function `ShowPartyRow'
[string "@KeyMaster/Core/UI/PartyFrameMapping.lua"]:368: in function `UpdateSingleUnitData'
[string "@KeyMaster/Core/UI/PartyFrameMapping.lua"]:385: in function `UpdatePartyFrameData'
[string "@KeyMaster/KeyMaster.lua"]:191: in function <KeyMaster/KeyMaster.lua:167>

Locals:
_ = Frame {
 RegisterEvent = <function> defined @!BugGrabber/BugGrabber.lua:491
 0 = <userdata>
 UnregisterEvent = <function> defined @!BugGrabber/BugGrabber.lua:491
 SetScript = <function> defined @!BugGrabber/BugGrabber.lua:491
}
event = "ADDON_ACTION_BLOCKED"
events = <table> {
 ADDON_ACTION_BLOCKED = <function> defined @!BugGrabber/BugGrabber.lua:557
 ADDON_ACTION_FORBIDDEN = <function> defined @!BugGrabber/BugGrabber.lua:557
 PLAYER_LOGIN = <function> defined @!BugGrabber/BugGrabber.lua:551
 LUA_WARNING = <function> defined @!BugGrabber/BugGrabber.lua:566
 ADDON_LOADED = <function> defined @!BugGrabber/BugGrabber.lua:511
}
commented

Yes, we were discussing this issue again and came to the same conclusion that it's ignoring the parent. Which is fine, just need to do some refactoring - we on it! Thank you for the very helpful feedback!

commented

Taking a look at the stacktrace it passes through the GROUP_ROSTER_UPDATE event listener:

KeyMaster/KeyMaster.lua

Lines 187 to 192 in 3462d0f

-- Only update UI if party tab is open
local partyTabContentFrame = _G["KeyMaster_PartyScreen"]
if partyTabContentFrame ~= nil and partyTabContentFrame:IsShown() then
-- reprocess party1-4 units
KeyMaster.PartyFrameMapping:UpdatePartyFrameData()
end

I'm guessing that the parent frame is not visible because this is hidden in combat, the problem is that :IsShown() doesn't take the parent into account, it needs to use :IsVisible() for that: https://warcraft.wiki.gg/wiki/API_ScriptRegion_IsShown

I haven't had time to test this myself; I'm thinking the way to reproduce it is to have this particular tab open, then hide the main frame, then finish the key or something.

Not sure why this event was triggered though...

commented

Thank you for the report. We've done quite a bit of research into this "type" off issue as it's occurrence was quite illusive. While there are some reports that this error message can be misleading by way of the stack tracing not pointing to the actual code causing the error (or worse, misrepresenting it entirely) we were fairly confident that previous adjustments to our code base would address Key Master being the root cause.

That being said, I can not say, seeing this stack trace, with 100% certainty that Key Master isn't the root cause here. This type of addon error is caused by a UI lockdown state when in combat making many UI interactions secured during that condition. The execution of KM_PlayerRow1:Show() would, in fact, cause such an error if, in theory, it's parent frame(s) - if any - were also displayed or otherwise not in a hidden AND in a locked state by cascading proxy.

In 1.1.3 we addressed this issue by ensuring that Key Master's main frame (of which all other Key Master frames are a child of) was incapable of being displayed (toggled visible) while in combat (e.g. It remains in a hidden state, incapable of being displayed if the player is in combat.)

I would ask to ensure you are running the latest version of Key Master (v1.1.4) and running as few addons as possible (even better if only Key Master) and see if the issue persists. If so, please let us know. We will also look into further refining these state checks.

commented

I'm running 1.1.4, can also change to an alpha build if you want me to test things. Unfortunately I can't really disable addons for M+. I did another dungeon run and it didn't bug out that run, but I'll see if I can find something.

commented

Please note that it may also be event driven; such as gaining rating, or your own key changing.

commented

In my case it happened the moment the key was finished, and it wasn't my key

commented

With a bit of luck, this should be fixed now. If for some reason you see it again, please let us know!