Grid2

Grid2

11M Downloads

[Bug] Anchoring bar to another bar that has load conditions causes lua errors.

Kolmarwow opened this issue ยท 3 comments

commented

Grid2 version: 2.3.0.
Game Client: WotLK Classic 3.4.1 (49345) on Windows 10.
Grid2 only addon enabled: Yes.
Working in previous version: Unsure as I only recently installed addon, but this bug was still present in 2.2.17.

Error Log

1x Grid2/modules/IndicatorBar.lua:42: attempt to index local 'PBar' (a nil value)
[string "@Grid2/modules/IndicatorBar.lua"]:42: in function `Layout'
[string "@Grid2/GridIndicator.lua"]:89: in function `LayoutAllFrames'
[string "@Grid2Options/modules/indicators/IndicatorBar.lua"]:51: in function <...Ons/Grid2Options/modules/indicators/IndicatorBar.lua:39>
[string "=[C]"]: ?
[string "@Grid2Options/Libs/AceConfig-3.0-3/AceConfigDialog-3.0-86/AceConfigDialog-3.0.lua"]:45: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:43>
[string "@Grid2Options/Libs/AceConfig-3.0-3/AceConfigDialog-3.0-86/AceConfigDialog-3.0.lua"]:836: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:658>
[string "=[C]"]: ?
[string "@Grid2Options/Libs/AceGUI-3.0-41/AceGUI-3.0.lua"]:66: in function <...eGrid2Options/Libs/AceGUI-3.0/AceGUI-3.0.lua:64>
[string "@Grid2Options/Libs/AceGUI-3.0-41/AceGUI-3.0.lua"]:300: in function `Fire'
[string "@Grid2Options/Libs/AceGUI-3.0-41/widgets/AceGUIWidget-DropDown.lua"]:432: in function <...ns/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua:423>
[string "=[C]"]: ?
[string "@Grid2Options/Libs/AceGUI-3.0-41/AceGUI-3.0.lua"]:66: in function <...eGrid2Options/Libs/AceGUI-3.0/AceGUI-3.0.lua:64>
[string "@Grid2Options/Libs/AceGUI-3.0-41/AceGUI-3.0.lua"]:300: in function `Fire'
[string "@Grid2Options/Libs/AceGUI-3.0-41/widgets/AceGUIWidget-DropDown-Items.lua"]:351: in function <...s/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua:341>

Steps to reproduce problem:

  1. Create two separate bar indicators.
  2. Go to Load tab on bar 1 and select lets say Unit Type = Players.
  3. Go to Layout tab on bar 2 and try to anchor to bar 1.
  4. Anchor will fail and the lua error above will display.

If you first anchor bar 2 to bar 1 and then set bar 1's load conditions then there's no problems, it's only if the bar already has existing load conditions.

commented

Version 2.3.1's bugfix added an additional problem where the Load tab is greyed out on bar 1 after bar 2 has been anchored to it. This is unnecessary as changing the load conditions on bar 1 after bar 2 has been anchored works fine and does not cause any lua errors in 2.3.0, it's only when you first try to set up the anchor on a bar with existing load conditions.

commented

Ahh that's right, I forgot about multibars. That will be better for what I have in mind, thank you.

commented

Yes, this may work but it is not supposed to work, and can stop working on future changes, or in complex profiles with several themes + different load conditions.
If you want to use load condidition with two (or more) stacked bars, its better to create and setup a new multibar indicator, and remove the old simple bars.