Import Models module in Views.lua to fix 3.148 Lua errors#5
Open
ratchet27 wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
models.isValidStackEffect()and started calling it fromViews.lua:461and:466, butViews.luanever imported theModelsmodule. Every redraw of a widget with astackEffect(or astageInfo) throwsattempt to index a nil value.local models = addon.load("Models#M")next to the existingsettingsimport. Manifest already loadssrc/Models.luabeforesrc/Views.lua, so the lookup is safe.Why this explains the reported symptoms
Reproduces the ESOUI v3.148 bug report:
stackCount > 0 and not stackEffectHasStageInfo and models.isValidStackEffect(...)).stageInfo and models.isValidStackEffect(...)).Bar.l.onCoreUpdate'sfor slotNum = 3,8 doloop, so every slot after the offending one (plus the shifted/appended widget cleanup in steps 2-4) never updates on that tick.Views.lua:513-525runs after the crash point and never executes, andCore.l.refineActionsskips removal whilestackCount > 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
/reloaduiwith the patch applied; cast Firekeeper - no Lua error; widget counts down and clears normally.stageInfo(e.g. Incinerate) - no Lua error at line 466.Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com