attempt to index upvalue 'cfg'
glassleo opened this issue ยท 3 comments
I'm getting this Lua error almost every time I log in to the game:
52x TipTacItemRef\ttItemRef.lua:187: attempt to index upvalue 'cfg' (a nil value)
[string "@TipTacItemRef\ttItemRef.lua"]:187: in function `CreateTooltipIcon'
[string "@TipTacItemRef\ttItemRef.lua"]:1560: in function `ApplyHooksToTips'
[string "@TipTacItemRef\ttItemRef.lua"]:1625: in function `?'
[string "@TipTacItemRef\ttItemRef.lua"]:199: in function <TipTacItemRef\ttItemRef.lua:199>
[string "=[C]"]: in function `LoadAddOn'
[string "@SoulshapeJournal\Core.lua"]:43: in function <SoulshapeJournal\Core.lua:38>
[string "=[C]"]: ?
[string "@Masque\Libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:70: in function <...aceMasque\Libs\AceAddon-3.0\AceAddon-3.0.lua:65>
[string "@Masque\Libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:527: in function `EnableAddon'
[string "@Masque\Libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:630: in function <...aceMasque\Libs\AceAddon-3.0\AceAddon-3.0.lua:615>
Locals:
self = TipTacItemRef {
0 = <userdata>
ApplyHooksToTips = <function> defined @TipTacItemRef\ttItemRef.lua:1444
ADDON_LOADED = <function> defined @TipTacItemRef\ttItemRef.lua:1602
ApplyWorkaroundForFirstMouseover = <function> defined @TipTacItemRef\ttItemRef.lua:323
SetBackdropBorderColorLocked = <function> defined @TipTacItemRef\ttItemRef.lua:1863
HookTips = <function> defined @TipTacItemRef\ttItemRef.lua:1597
name = "ItemRef"
VARIABLES_LOADED = <function> defined @TipTacItemRef\ttItemRef.lua:263
CreateTooltipIcon = <function> defined @TipTacItemRef\ttItemRef.lua:185
OnApplyConfig = <function> defined @TipTacItemRef\ttItemRef.lua:290
ApplyHooksToCFGDFI = <function> defined @TipTacItemRef\ttItemRef.lua:1570
ApplyHooksToGIFIC = <function> defined @TipTacItemRef\ttItemRef.lua:1584
SetHyperlink_Hook = <function> defined @TipTacItemRef\ttItemRef.lua:459
}
tip = PetJournalPrimaryAbilityTooltip {
0 = <userdata>
linePool = <table> {
}
WeakAgainstIcon = <unnamed> {
}
OnBackdropLoaded = <function> defined @SharedXML\Backdrop.lua:144
Delimiter1 = <unnamed> {
}
CurrentCooldown = <unnamed> {
}
SetBackdropBorderColor = <function> defined @SharedXML\Backdrop.lua:414
Delimiter2 = <unnamed> {
}
AdditionalText = <unnamed> {
}
ApplyBackdrop = <function> defined @SharedXML\Backdrop.lua:286
SetBackdrop = <function> defined @SharedXML\Backdrop.lua:321
ClearBackdrop = <function> defined @SharedXML\Backdrop.lua:274
GetBackdropBorderColor = <function> defined @SharedXML\Backdrop.lua:401
GetBackdrop = <function> defined @SharedXML\Backdrop.lua:339
WeakAgainstType1Label = <unnamed> {
}
SetBorderBlendMode = <function> defined @SharedXML\Backdrop.lua:258
Description = <unnamed> {
}
Duration = <unnamed> {
}
layoutType = "TooltipDefaultLayout"
WeakAgainstType1 = <unnamed> {
}
AddLine = <function> defined @TipTacItemRef\ttItemRef.lua:394
SetupTextureCoordinates = <function> defined @SharedXML\Backdrop.lua:206
OnBackdropSizeChanged = <function> defined @SharedXML\Backdrop.lua:174
HasBackdropInfo = <function> defined @SharedXML\Backdrop.lua:270
StrongAgainstType1 = <unnamed> {
}
strongAgainstTextures = <table> {
}
ttIcon = <unnamed> {
}
GetEdgeSize = <function> defined @SharedXML\Backdrop.lua:180
NineSlice = <unnamed> {
}
weakAgainstTextures = <table> {
}
StrongAgainstLabel = <unnamed> {
}
StrongAgainstType1Label = <unnamed> {
}
TooltipBackdropOnLoad = <function> defined @SharedXML\SharedTooltipTemplates.lua:172
GetBackdropCoordValue = <function> defined @Blizzard_Deprecated\Deprecated_9_1_5.lua:15
WeakAgainstLabel = <unnamed> {
}
StrongAgainstIcon = <unnamed> {
}
Name = <unnamed> {
}
AbilityPetType = <unnamed> {
}
SetupPieceVisuals = <function> defined @SharedXML\Backdrop.lua:238
SetBackdropColor = <function> defined @SharedXML\Backdrop.lua:391
GetBackdropColor = <function> defined @SharedXML\Backdrop.lua:382
MaxCooldown = <unnamed> {
}
}
(*temporary) = <function> defined =[C]:-1
(*temporary) = <unnamed> {
0 = <userdata>
}
(*temporary) = nil
(*temporary) = "BACKGROUND"
(*temporary) = <unnamed> {
0 = <userdata>
}
(*temporary) = nil
(*temporary) = <userdata>
(*temporary) = "attempt to index upvalue 'cfg' (a nil value)"
cfg = nil
Ohh, that explains why it randomly started happening a few weeks ago (after installing Soulshape Journal).
It seems to work. Thanks!
The bug in TipTac is triggered in addon Soulshape Journal with pre-loading addon Blizzard_Collections. In this case the event ADDON_LOADED for addon Blizzard_Collections in TipTac is fired before the config is initialized in event VARIABLES_LOADED. I fixed this.
Interestingly I didn't get this error if I temporarily install the addon Soulshape Journal, but it's definitively related to that.
Here's a dev version:
TipTac-dev.zip
Is it working for you, too?