Skip to content

Import Models module in Views.lua to fix 3.148 Lua errors#5

Open
ratchet27 wants to merge 1 commit into
cloudor126:masterfrom
ratchet27:fix-views-missing-models-import
Open

Import Models module in Views.lua to fix 3.148 Lua errors#5
ratchet27 wants to merge 1 commit into
cloudor126:masterfrom
ratchet27:fix-views-missing-models-import

Conversation

@ratchet27

Copy link
Copy Markdown

Summary

  • v3.148 introduced models.isValidStackEffect() and started calling it from Views.lua:461 and :466, but Views.lua never imported the Models module. Every redraw of a widget with a stackEffect (or a stageInfo) throws attempt to index a nil value.
  • Fix: add local models = addon.load("Models#M") next to the existing settings import. Manifest already loads src/Models.lua before src/Views.lua, so the lookup is safe.

Why this explains the reported symptoms

Reproduces the ESOUI v3.148 bug report:

  • "Firekeeper Lua error at Views.lua:461" — stack path (stackCount > 0 and not stackEffectHasStageInfo and models.isValidStackEffect(...)).
  • "Incinerate Lua error at Views.lua:466" — stage path (stageInfo and models.isValidStackEffect(...)).
  • "Only the last-cast DK skill timer shows, other class timers lost" — the throw aborts Bar.l.onCoreUpdate's for slotNum = 3,8 do loop, so every slot after the offending one (plus the shifted/appended widget cleanup in steps 2-4) never updates on that tick.
  • "Firekeeper sticks at red 0.0 until another DK skill is cast" — the "remain <= 0" cleanup block at Views.lua:513-525 runs after the crash point and never executes, and Core.l.refineActions skips removal while stackCount > 0, so the action plus stuck widget remain until a new action overwrites the slot.

ESO throttles repeat Lua errors to one dialog per session, which is why the error "only triggers once, then doesn't come back until /reloadui" even though it fires every 100 ms.

Test plan

  • /reloadui with the patch applied; cast Firekeeper - no Lua error; widget counts down and clears normally.
  • Cast a skill with stageInfo (e.g. Incinerate) - no Lua error at line 466.
  • Multi-skill rotation (arcanist + DK backbar combo): all timers remain visible; no slot dropped after a Firekeeper cast.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Views.lua uses models.isValidStackEffect() on lines 461 and 466 but
never declares the models local. Since v3.148 introduced that helper,
every redraw of a widget with a stack effect or stage info throws
"attempt to index a nil value", visible as Lua errors on Firekeeper
(line 461) and Incinerate (line 466).

The thrown error aborts Bar.l.onCoreUpdate's slot 3..8 loop, which
also explains the cascade of symptoms reported on ESOUI: only the
last-cast timer shows, other class timers vanish, and actions with
a persistent stackEffect (e.g. Firekeeper's minor buffs) stay stuck
at red 0.0 forever because the cooldown-hide branch after the crash
point never runs and refineActions does not remove actions while
stackCount > 0.

Fix by importing Models#M alongside the existing Settings#M import;
the manifest already loads Models before Views so the lookup is safe.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants