ascott18 / TellMeWhen

TellMeWhen is a combat tracking AddOn for World of Warcraft Retail and Classic
https://wow.curseforge.com/projects/tellmewhen
GNU General Public License v3.0
86 stars 11 forks source link

[Bug] #1793

Closed junmocho2 closed 4 years ago

junmocho2 commented 4 years ago

What version of TellMeWhen are you using?

8.7.5

What steps will reproduce the problem?

  1. Have the following Lua snippet run: TargetFrame:SetUserPlaced(true)

  2. Set up a TMW icon with the following notification: While C_NamePlate.GetNamePlateForUnit("player") ~= nil Run PlayerNamePlate = C_NamePlate.GetNamePlateForUnit("player") PlayerNamePlate.UnitFrame.BuffFrame:SetScript("OnEvent", nil) PlayerNamePlate.UnitFrame.BuffFrame:Hide() PlayerNamePlate.UnitFrame.healthBar:SetHeight(8) TargetFrame:ClearAllPoints() TargetFrame:SetPoint("LEFT", "PlayerNamePlate", "RIGHT", 0, 0)

  3. Reload UI. Everything is as intended up to this point.

  4. Enter combat and I get the following error: [ADDON_ACTION_BLOCKED] AddOn 'TellMeWhen' tried to call the protected function 'resume()'. [string "@!BugGrabber\BugGrabber.lua"]:519: in function <!BugGrabber\BugGrabber.lua:519> [string "=[C]"]: in function `resume' [string "@TellMeWhen\TellMeWhen-8.7.5.lua"]:2721: in function <TellMeWhen\TellMeWhen.lua:2710>

  5. The error occurs when I enter combat for the first time after a UI reload. The error does not reoccur until another reload.

What do you expect to happen? What happens instead? I don't understand what the error means and want to resolve it.

Screenshots and Export Strings

^1^T^SType^Sconditionicon ^SEvents^T ^N1^T ^SType^SLua ^SLua^S--~`<Untitled~`Lua~`Code>~J ~J local~`icon~`=~`...~J ~J --Your~`code~`goes~`here:~J ~J PlayerNamePlate~`=~`C_NamePlate.GetNamePlateForUnit("player")~J ~J PlayerNamePlate.UnitFrame.BuffFrame:SetScript("OnEvent",~`nil)~J PlayerNamePlate.UnitFrame.BuffFrame:Hide()~J PlayerNamePlate.UnitFrame.healthBar:SetHeight(8)~J ~J TargetFrame:ClearAllPoints()~J TargetFrame:SetPoint("LEFT",~`"PlayerNamePlate",~`"RIGHT",~`0,~`0) ^SEvent^SWCSP ^SOnConditionConditions^T ^N1^T ^SType^SLUA ^SName^SC_NamePlate.GetNamePlateForUnit("player")~`~|=~`nil ^t^Sn^N1 ^t^t^Sn^N1 ^t^SCustomTex^S232283 ^SFakeHidden^B ^SEnabled^B ^t^N87505^S~`~| ^Sicon^^

Additional Info

Thank you for all your amazing work!

ascott18 commented 4 years ago

Right - you can't do basically any of the things you're doing in your script while in combat.