HydraUI

HydraUI

841k Downloads

Experience frame cannot anchor to reputation frame

BenjaminHamon opened this issue · 2 comments

commented

Bug description

The interface initialization fails if the Experience frame is set to anchor to the Reputation frame (the reverse from the default), with the following error:

Cannot anchor to a region dependent on it

The error occurs only on initialization, meaning it is actually possible to have the UI behaving correctly after setting the mover, and observing the issue only after a UI reload. At this point, the HydraUI is broken, with only a few frames being active. The in-game fix is to restore the mover defaults.

Steps to reproduce

  • Change the mover for Experience, by setting its anchor to HydraUI Reputation.
  • Reload the interface.
  • Observe the error and the HydraUI frames being only partially present.

Error details

Message: Interface\AddOns\HydraUI\Elements\Reputation-Réputation.lua:49: Action[SetPoint] failed because[Cannot anchor to a region dependent on it]: attempted from: HydraUI Reputation:SetPoint.

Stack: Interface\AddOns\HydraUI\Elements\Reputation-Réputation.lua:49: Action[SetPoint] failed because[Cannot anchor to a region dependent on it]: attempted from: HydraUI Reputation:SetPoint.
[string "@interface\AddOns\HydraUI\Elements\Initialize.lua"]:74: in function `LoadModules'
[string "@interface\AddOns\HydraUI\Elements\Initialize.lua"]:161: in function <Interface\AddOns\HydraUI\Elements\Initialize.lua:142>

Version

HydraUI 1.75 for WoW WLK Classic 3.4.0

commented

See Elements/Reputation.lua#L48.

function Reputation:CreateBar()

[...]

if (Settings["experience-enable"] and UnitLevel("player") ~= MAX_PLAYER_LEVEL) then
     self:SetPoint("TOP", HydraUI:GetModule("Experience"), "BOTTOM", 0, -8)

[...]

I was looking for the source of the issue. Am I right to understand there is a dependency for the HydraUI initialization, from the Reputation module to the Experience module? Can we change this code in order to avoid this error from occurring? And generally, should sibling modules avoid having dependencies between themselves?

commented

Thank you for the well documented report, I was able to make a change to stop this from happening. In the future I'd like to find a new position for both of these bars