WeakAuras

WeakAuras

206M Downloads

LUA errors after update

Jaedra opened this issue ยท 4 comments

commented

Describe the bug

I started receiving repeated LUA errors in BugSack after the last update. The errors appear to be related only to any Druid WeakAuras. I typically use Luxthos, which started giving errors. I tried deleting and importing a fresh copy of his package, which did not help. I also tried Afenar's Druid package, which throws the same type of error for different abilities.

Do you have an error log of what happened?
Yes, below is part of the initial error with Luxthos. If I delete the Starsurge aura altogether, it starts throwing me errors for Wrath and Starfire as well. If I /reload, everything works fine until I go into /wa settings and then the fatality resumes and repeats itself indefinitely.

1849x [string "--[==[ Error in 'Starsurge':'condition chec..."]:30: attempt to index local 'state' (a nil value)
[string "--[==[ Error in 'Starsurge':'condition checks' ]==] local newActiveConditions = {};
local propertyChanges = {};
local nextTime;
local uid = "9rGz0k3cAoa"
return function(region, hideRegion)
  local id = region.id
  local cloneId = region.cloneId or ''
  local state = region.states
  local activatedConditions = WeakAuras.GetActiveConditions(id, cloneId)
  wipe(newActiveConditions)
  local recheckTime;
  local now = GetTime();
  if (not hideRegion) then
      if (state and WeakAuras.CallCustomConditionTest("9rGz0k3cAoa", 1, state[2], 1, nil, nil)) then
        newActiveConditions[1] = true;
      end

      if (state and WeakAuras.CallCustomConditionTest("9rGz0k3cAoa", 2, state[1], 1, nil, nil)) then
        newActiveConditions[2] = true;
      end

      if (state and WeakAuras.CallCustomConditionTest("9rGz0k3cAoa", 3, state[1], 1, nil, nil)) then
        newActiveConditions[3] = true;
      end

      if (state and WeakAuras.CallCustomConditionTest("9rGz0k3cAoa", 4, state[1], 0, nil, nil)) then
        newActiveConditions[4] = true;
      end

      if (state[-1] and state[-1].show and state[-1]["incombat"]~= nil and state[-1]["incombat"]==false) then
        newActiveConditions[5] = true;
      end

  end
  if (recheckTime) then
    WeakAuras.scheduleConditionCheck(recheckTime, uid, cloneId);
  end
  wipe(propertyChanges)
  if (activatedConditions[1] and not newActiveConditions[1]) then
    propertyChanges['sub.1.glow'] = false
    propertyChanges['sub.1.glowType'] = "buttonOverlay"
  end
  if (activatedConditions[2] and not newActiveConditions[2]) then
    propertyChanges['desaturate'] = false
  end
  if (activatedConditions[3] and not newActiveConditions[3]) then
    propertyChanges['color'] = {1, 1, 1, 1}
    propertyChanges['desaturate'] = false
  end
  if (activatedConditions[4] and not newActiveConditions[4]) then
    propertyChanges['color'] = {1, 1, 1, 1}
    propertyChanges['desaturate'] = false
  end
  if (activatedConditions[5] and not newActiveConditions[5]) then
    propertyChanges['sub.1.glow'] = false
  end

  if (newActiveConditions[1]) then
    if (not activatedConditions[1]) then
      propertyChanges['sub.1.glow'] = true
      propertyChanges['sub.1.glowType'] = "buttonOverlay"
    else
      if(propertyChanges['sub.1.glow'] ~= nil) then
        propertyChanges['sub.1.glow'] = true
      end
      if(propertyChanges['sub.1.glowType'] ~= nil) then
        propertyChanges['sub.1.glowType'] = "buttonOverlay"
      end
    end
  end

  activatedConditions[1] = newActiveConditions[1]
  if (newActiveConditions[2]) then
    if (not activatedConditions[2]) then
      propertyChanges['desaturate'] = true
    else
      if(propertyChanges['desaturate'] ~= nil) then
        propertyChanges['desaturate'] = true
      end
    end
  end

  activatedConditions[2] = newActiveConditions[2]
  if (newActiveConditions[3]) then
    if (not activatedConditions[3]) then
      propertyChanges['color'] = {0.47450980392157, 0.51372549019608, 1, 1}
      propertyChanges['desaturate'] = true
    else
      if(propertyChanges['color'] ~= nil) then
        propertyChanges['color'] = {0.47450980392157, 0.51372549019608, 1, 1}
      end
      if(propertyChanges['desaturate'] ~= nil) then
        propertyChanges['desaturate'] = true
      end
    end
  end

  activatedConditions[3] = newActiveConditions[3]
  if (newActiveConditions[4]) then
    if (not activatedConditions[4]) then
      propertyChanges['color'] = {0.87450980392157, 0.34117647058824, 0.32941176470588, 1}
      propertyChanges['desaturate'] = true
    else
      if(propertyChanges['color'] ~= nil) then
        propertyChanges['color'] = {0.87450980392157, 0.34117647058824, 0.32941176470588, 1}
      end
      if(propertyChanges['desaturate'] ~= nil) then
        propertyChanges['desaturate'] = true
      end
    end
  end

  activatedConditions[4] = newActiveConditions[4]
  if (newActiveConditions[5]) then
    if (not activatedConditions[5]) then
      propertyChanges['sub.1.glow'] = false
    else
      if(propertyChanges['sub.1.glow'] ~= nil) then
        propertyChanges['sub.1.glow'] = false
      end
    end
  end

  activatedConditions[5] = newActiveConditions[5]
  if(propertyChanges['color'] ~= nil) then
    region:Color(propertyChanges['color'][1], propertyChanges['color'][2], propertyChanges['color'][3], propertyChanges['color'][4])
  end
  if(propertyChanges['sub.1.glowType'] ~= nil) then
    region.subRegions[1]:SetGlowType(propertyChanges['sub.1.glowType'])
  end
  if(propertyChanges['desaturate'] ~= nil) then
    region:SetDesaturated(propertyChanges['desaturate'])
  end
  if(propertyChanges['sub.1.glow'] ~= nil) then
    region.subRegions[1]:SetVisible(propertyChanges['sub.1.glow'])
  end
end
"]:30: in function `?'
[string "@WeakAuras\Conditions.lua"]:674: in function <WeakAuras\Conditions.lua:665>
[string "@WeakAuras\Conditions.lua"]:690: in function <WeakAuras\Conditions.lua:682>
[string "@WeakAuras\Conditions.lua"]:700: in function <WeakAuras\Conditions.lua:696>

Locals:
region = <unnamed> {
 0 = <userdata>
 iconSource = -1
 AnchorSubRegion = <function> defined @WeakAuras\RegionTypes\Icon.lua:140
 subRegionEvents = <table> {
 }
 Expand = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:855
 yOffset = 5.100000
 anchorPoint = "CENTER"
 GetColor = <function> defined @WeakAuras\RegionTypes\Icon.lua:410
 icon = <unnamed> {
 }
 SetOffset = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:331
 keepAspectRatio = true
 SendChat = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:278
 SetInverse = <function> defined @WeakAuras\RegionTypes\Icon.lua:474
 toShow = false
 SetRegionHeight = <function> defined @WeakAuras\RegionTypes\Icon.lua:469
 UpdateIcon = <function> defined @WeakAuras\RegionTypes\Icon.lua:434
 PixelSnapDisabled = true
 cloneId = ""
 Update = <function> defined @WeakAuras\RegionTypes\Icon.lua:537
 regionType = "icon"
 GetRegionAlpha = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:400
 relativePoint = "CENTER"
 SoundPlay = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:260
 zoom = 0.450000
 color_b = 1
 UpdateRegionHasTimerTick = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:422
 alpha = 1
 color_r = 1
 SetXOffset = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:340
 SetGlow = <function> defined @WeakAuras\RegionTypes\Icon.lua:588
 SetRegionWidth = <function> defined @WeakAuras\RegionTypes\Icon.lua:464
 triggerProvidesTimer = true
 RealClearAllPoints = <function> defined =[C]:-1
 displayIcon = ""
 RunCode = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:286
 GetYOffset = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:352
 SetAnimAlpha = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:404
 Collapse = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:833
 ClickToPick = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:746
 OptionsClosed = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:741
 SetYOffsetRelative = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:369
 SoundRepeatStop = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:206
 SetIcon = <function> defined @WeakAuras\RegionTypes\Icon.lua:417
 GetXOffsetRelative = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:373
 cooldownSwipe = true
 SetDesaturated = <function> defined @WeakAuras\RegionTypes\Icon.lua:460
 GetXOffset = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:348
 SetYOffset = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:344
 SetCooldownEdge = <function> defined @WeakAuras\RegionTypes\Icon.lua:488
 color_g = 1
 PreShow = <function> defined @WeakAuras\RegionTypes\Icon.lua:529
 SetTime = <function> defined @WeakAuras\RegionTypes\Icon.lua:516
 GetYOffsetRelative = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:377
 SetAnchor = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:319
 GlowExternal = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:294
 SetOffsetRelative = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:356
 SetRegionAlpha = <function> defined @WeakAuras\RegionTypes\RegionPrototype.lua:390
 finishFormatters = <table> {
 }
 SetZoom = <function> defined @WeakAuras\RegionTypes\Icon.lua:496
 cooldownEdge = false
 regionHasTimer = false
 subRegions = <table> {
 }
 height = 35
 startFormatters = <ta

To Reproduce

I just opened WeakAuras settings via /wa command in-game. Then if I do anything with the Druid WeakAura, even just click the + to expand the group, the errors start shortly thereafter.

Screenshots

Did you try having WeakAuras as the only enabled addon and everything else (especially something like ElvUI) disabled?

Which version of WeakAuras are you using?
3.2.0

Are you on World of Warcraft Classic or Retail?

  • Classic
  • [x ] Retail

Was it working in a previous version? If yes, which was the last good one?
Yes, it was working in the previous version.

Additional Info

It's the Druid WeakAura, seems any druid one. I have tested the following and received errors:
https://wago.io/Afenar_Druid
https://wago.io/ryBp05DHX

Hopefully I filled out everything correctly and gave you what you need. If I missed something, please let me know! Thank you!

commented

That is absolutely perfect, thank you! :-)

commented

Heya, can you try with 3.2.1 please? That should be fixed already!

commented

Hiya! Thanks so much for getting back to me so fast! If I did it correctly, that fixed it! I was getting a few more errors but thankfully, they are just on first /reload, they are not persistent.

I would not be surprised if I installed it improperly, so let me know if that's the case! I wasn't sure what to do with all the files in the .zip, so I just grabbed the folders and put them into my Addons folder (WeakAuras, WeakAurasArchive, WeakAurasModelPaths, WeakAurasOptions, WeakAurasTemplates) and did a /reload.

Errors are:

3x Couldn't open WeakAuras\Libs\LibSharedMedia-3.0-8020003\lib.xml

... and the same error for all the folders under \Libs\

I noticed that the Dev version of the addon (is this 3.2.1? I got it from the main page here, and in-game it's called "WeakAuras Dev" when I open the settings panel) only had the subfolder \LibDeflate under \Libs, so I just took the other folders from the 3.2.0 version under \Libs\ and put them under the Dev version's \Libs folder and it resolved the errors I got on /reload.

If that was a dumb move, just let me know. :-)

Thanks again!

commented

It might just be that Curseforge is slow with updating, in the meantime you can download 3.2.1 from here https://github.com/WeakAuras/WeakAuras2/releases/download/3.2.1/WeakAuras-3.2.1.zip