Closed JohnnyUndercoverr closed 1 year ago
It also shows 'Out of date' in the addon control panel although it's the latest version.
+1
This is a bug with BigDebuffs, not TellMeWhen. BigDebuffs is making assumptions about event registration ordering that won't always be true.
Consider the sequence of events when TellMeWhen is disabled:
OnEnabled
hook fires (which doesn't happen until PLAYER_LOGIN).NAME_PLATE_UNIT_ADDED
during its initial script execution (i.e. it executes frame:RegisterEvent
as a top level statement).NAME_PLATE_UNIT_ADDED
via AceEvent-3.0. frame.TPFrame:IsShown()
returns true by the time BigDebuff's event handler runs and so BigDebuffs is able to hook into the nameplate.Now, consider the sequence of events when TellMeWhen is enabled:
OnEnabled
hook fires (which doesn't happen until PLAYER_LOGIN).NAME_PLATE_UNIT_ADDED
with AceEvent-3.0. AceEvent now has the first registration of NAME_PLATE_UNIT_ADDED
.NAME_PLATE_UNIT_ADDED
during its initial script execution (i.e. it executes frame:RegisterEvent
as a top level statement). TheatPlates' registration is now second in the execution order, with AceEvent's registration being first.NAME_PLATE_UNIT_ADDED
via AceEvent-3.0. BigDebuff's registration is first in the execution order since its using AceEvent. (NB: AceEvent's events are not stored in an ordered table, so all registrations with AceEvent can be fired in a nondeterministic order, but this doesn't actually matter here since ThreatPlates doesn't use AceEvent).frame.TPFrame:IsShown() == false
when it runs first and so does nothing.This could happen with any addon that registers NAME_PLATE_UNIT_ADDED
with AceEvent. It just so happens that TellMeWhen does this, and that "Te" is alphabetically before "Ti".
Ultimately its the responsibility of BigDebuffs to ensure that when it is examining or interacting with the state of another addon, that it is always doing that examination of that state after the third party addon has had a chance to actually update that state.
If BigDebuffs wants to eliminate possible issues with nondeterministic event registration ordering, it should start by removing its usage of AceEvent and instead manually register events with its own dedicated frame instance.
See also: https://github.com/jordonwow/bigdebuffs/issues/520
Thanks for the detailed explanation. I see you've posted in https://github.com/jordonwow/bigdebuffs/issues/520 as well. Cheers!
A workaround for now would be to add TidyPlates_ThreatPlates to BigDebuffs.toc 's OptionalDeps:
## OptionalDeps: Masque, TidyPlates_ThreatPlates
Should generally always work, unless another addon with a name alphabetically before BigDebuffs also registers NAME_PLATE_UNIT_ADDED with AceEvent (pretty unlikely that there are any such addons in existence).
A workaround for now would be to add TidyPlates_ThreatPlates to BigDebuffs.toc 's OptionalDeps:
## OptionalDeps: Masque, TidyPlates_ThreatPlates
Should generally always work, unless another addon with a name alphabetically before BigDebuffs also registers NAME_PLATE_UNIT_ADDED with AceEvent (pretty unlikely that there are any such addons in existence).
Is there a way to do this if you're not the developer? Like, can I do this by editing something in the addon file I download?
This issue should be fixed with this PR for BigDebuffs https://github.com/jordonwow/bigdebuffs/pull/715 and version 11.2.4 of Threat Plates.
WoW Version
Retail
TellMeWhen Version
10.0.8
Describe the bug
While using the addons BigDebuffs and ThrethPlates together with TellMeWhen, BigDebuffs is not working, disabling TellMeWhen makes those two addons work together just fine.
Export Strings