Enchantrix popup in combat = LUA error (attempted to call a protected function)
  • looting a green disenchantable item from random mobs in a raid (even LFR), on a char with Enchanting profession, will cause the Enchantrix window to pop up and you risk getting in combat before having a chance to press any buttons.
    The Enchantrix window will often pop up even while in combat.

    at this point there's no LUA error yet, but... if i now press the "No" button (or any button, i think) while still in combat (the group is still fighting random mobs or has even pulled the boss) then this error appears:

    Date: 2017-11-26 13:35:25
    ID: 1
    Error occured in: AddOn: Enchantrix
    Count: 3
    Message: Note: AddOn Enchantrix attempted to call a protected function (AutoDEPromptYes:SetAttribute()) during combat lockdown.
    Debug:
    [C]: SetAttribute()
    Enchantrix\EnxAutoDisenchant.lua:563:
    Enchantrix\EnxAutoDisenchant.lua:559
    Enchantrix\EnxAutoDisenchant.lua:570:
    Enchantrix\EnxAutoDisenchant.lua:566
    Locals:
    None
    AddOns:
    [...snip...]
    AucAdvanced, v7.5.5724 (TasmanianThylacine)
    [...]
    Enchantrix, v7.5.5724 (TasmanianThylacine)
    [...]
  • Yes, this is mostly because all of Blizzard's APIs to tell if you are in combat or not... are completely unreliable. If you check the code, you'll find multiple methods and attempts to detect combat lockdown and avoid action - but all of them fail from time to time. The best suggestion I've heard so far is just to move the dialog offscreen if combat is detected in any way.
  • And I just got that same error message - while I was definitely NOT in combat (and hadn't been for several minutes).
    Sigh, yet another Blizzard false taint bug...
  • I noticed that while most protected functions are behind InCombatLockdown/UnitAffectingCombat tests, that particular line isn't, for some reason. Is it worth putting a combat test around that line too?
  • Since Enchantrix has a habit of popping up that dialogue pretty much all the time you find an appropriate item and have the profession (enchanting - disenchant/ jewelcrafting - prospecting / inscription - milling), i'm amazed it wasn't reported sooner - so yes, the Enchantrix yes/no/ignore buttons and their profession-equivalent actions need combat lockdown tests too.


    imho, every user-clickable button in Auctioneer should have such combat lockdown tests, even the AH interface.


    Sometimes i get errors when i find myself in combat while just searching for stuff in AH - usually this happens when the other faction invades the town and starts killing NPCs.
    In this case i find myself in combat even if not tagged as PvP and thus not attackable, just because they start killing the auctioneer NPC that i was interacting with. (Auctioneer NPCs are regular attackable NPCs)

    When Legion was launched and demon invasions were common in cities it was also common to get Auctioneer LUA errors related to combat whenever demons were being found and fought near AuctionHouses - even if the demon was outside and i was inside i was getting combat related errors because the game was suddenly deciding i was in combat, even if the demon could not reach/damage me inside the AH.
  • I stopped adding combat protection after (extensively) verifying that it wasn't working correctly and that the Blizzard code was falsely reporting combat when the user could not possibly be in combat.
  • maybe let the user decide that?
    (in case that Blizzard ever decides to modify their combat-mode logic)

    in those cases, when combat mode is detected, maybe add an extra yes/no confirmation with a warning that continuing the following action will probably trigger a combat-protected LUA error if the user is really in combat?
    (and make the confirmation optional via settings, with an additional setting to let the user to always assume that "yes" or "no" was selected for this)
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

privacy
norganna's addons network · tf2 warehouse · scrap warehouse · auctioneer addon · gatherer addon · addon forums · rdrct