[Bug]: Lua-Error 143
Ssesmar opened this issue ยท 6 comments
What happened?
Everytime i starting the game i get this error
Is there any errors?
Message: Interface/AddOns/Diminish/core/icons.lua:143: attempt to index field 'db' (a nil value)
Time: Wed Jan 25 13:34:49 2023
Count: 1
Stack: Interface/AddOns/Diminish/core/icons.lua:143: attempt to index field 'db' (a nil value)
[string "@Interface/AddOns/Diminish/core/icons.lua"]:143: in function `AnchorPartyFrames'
[string "@Interface/AddOns/Diminish/Diminish.lua"]:274: in function <Interface/AddOns/Diminish/Diminish.lua:272>
[string "=[C]"]: in function `OnSystemSettingChange'
[string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:1914: in function `UpdateSystemSettingOrientation'
[string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:1934: in function `UpdateSystemSetting'
[string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:277: in function `UpdateSystem'
[string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:1886: in function `UpdateSystem'
[string "@Interface/FrameXML/EditModeManager.lua"]:1039: in function `UpdateSystem'
[string "@Interface/FrameXML/EditModeManager.lua"]:1027: in function <Interface/FrameXML/EditModeManager.lua:1026>
[string "=[C]"]: in function `secureexecuterange'
[string "@Interface/FrameXML/EditModeManager.lua"]:1029: in function `UpdateSystems'
[string "@Interface/FrameXML/EditModeManager.lua"]:899: in function `UpdateLayoutInfo'
[string "@Interface/FrameXML/EditModeManager.lua"]:238: in function <Interface/FrameXML/EditModeManager.lua:235>
Locals: self = <table> {
FindCompactRaidFrameByUnit = <function> defined @Interface/AddOns/Diminish/core/icons.lua:93
StopCooldown = <function> defined @Interface/AddOns/Diminish/core/icons.lua:695
AnchorPartyFrames = <function> defined @Interface/AddOns/Diminish/core/icons.lua:142
UpdatePositions = <function> defined @Interface/AddOns/Diminish/core/icons.lua:211
StartCooldown = <function> defined @Interface/AddOns/Diminish/core/icons.lua:630
HideAll = <function> defined @Interface/AddOns/Diminish/core/icons.lua:547
ReleaseNameplate = <function> defined @Interface/AddOns/Diminish/core/icons.lua:535
GetFrame = <function> defined @Interface/AddOns/Diminish/core/icons.lua:431
ReleaseFrame = <function> defined @Interface/AddOns/Diminish/core/icons.lua:558
CreateUIParentOffsets = <function> defined @Interface/AddOns/Diminish/core/icons.lua:288
OnFrameConfigChanged = <function> defined @Interface/AddOns/Diminish/core/icons.lua:475
FindPartyFrameByUnit = <function> defined @Interface/AddOns/Diminish/core/icons.lua:120
GetAnchor = <function> defined @Interface/AddOns/Diminish/core/icons.lua:22
}
members = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'db' (a nil value)"
NS = <table> {
DR_TIME = 18.500000
Timers = <table> {
}
CleanupDB = <function> defined @Interface/AddOns/Diminish/helpers.lua:33
IS_CLASSIC = false
Diminish = Frame {
}
RemoveTable = <function> defined @Interface/AddOns/Diminish/helpers.lua:79
NewTable = <function> defined @Interface/AddOns/Diminish/helpers.lua:72
IS_NOT_RETAIL = false
ReleaseTables = <function> defined @Interface/AddOns/Diminish/helpers.lua:85
DR_STATES_COLORS = <table> {
}
anchors = <table> {
}
Icons = <table> {
}
iconFrames = <table> {
}
DEFAULT_SETTINGS = <table> {
}
CopyDefaults = <function> defined @Interface/AddOns/Diminish/helpers.lua:16
GetAuraDuration = <function> defined @Interface/AddOns/Diminish/helpers.lua:53
useCompactPartyFrames = false
CATEGORIES = <table> {
}
}
Icons = <table> {
FindCompactRaidFrameByUnit = <function> defined @Interface/AddOns/Diminish/core/icons.lua:93
StopCooldown = <function> defined @Interface/AddOns/Diminish/core/icons.lua:695
AnchorPartyFrames = <function> defined @Interface/AddOns/Diminish/core/icons.lua:142
UpdatePositions = <function> defined @Interface
Game Version
Retail
Game Language
German
Does the issue still occur when all other addons are temporarily disabled?
Yes, issue still occurs.
Any additional info?
No response
Hello! I'm getting this error too. I have Diminish attached to the nameplates.
7x Diminish/core/icons.lua:143: attempt to index field 'db' (a nil value)
[string "@Diminish/core/icons.lua"]:143: in function `AnchorPartyFrames'
[string "@Diminish/Diminish.lua"]:274: in function <Diminish/Diminish.lua:272>
[string "=[C]"]: in function `OnSystemSettingChange'
[string "@FrameXML/EditModeSystemTemplates.lua"]:1914: in function `UpdateSystemSettingOrientation'
[string "@FrameXML/EditModeSystemTemplates.lua"]:1934: in function `UpdateSystemSetting'
[string "@FrameXML/EditModeSystemTemplates.lua"]:277: in function `UpdateSystem'
[string "@FrameXML/EditModeSystemTemplates.lua"]:1886: in function `UpdateSystem'
[string "@FrameXML/EditModeManager.lua"]:1039: in function `UpdateSystem'
[string "@FrameXML/EditModeManager.lua"]:1027: in function <FrameXML/EditModeManager.lua:1026>
[string "=[C]"]: in function `secureexecuterange'
[string "@FrameXML/EditModeManager.lua"]:1029: in function `UpdateSystems'
[string "@FrameXML/EditModeManager.lua"]:899: in function `UpdateLayoutInfo'
[string "@FrameXML/EditModeManager.lua"]:238: in function <FrameXML/EditModeManager.lua:235>
Locals:
self = <table> {
So I got this too and was able to debug it a bit.
Icons:AnchorPartyFrames() is now getting called before PLAYER_LOGIN_EVENT in response to the hook on EditModeManagerFrame/OnSystemSettingChange (presumably new in 10.0.5) So the Diminish db isn't yet initialized.
I was able to workaround the bug by making a small modification:
Diminish.lua around line 274...
old:
Icons:AnchorPartyFrames()
new:
if NS.db then Icons:AnchorPartyFrames() end
I don't know the code well enough to know if this is a proper fix, but if its wrong it probably only affects detection of switching between party and raid style frames without a reload.
It works for me well enough, but your mileage may very. Hope this helps...
Well, that removed the error that I get when I log in, but now I'm not sure the addon will work properly. Testing required ๐