Rarity

Rarity

18M Downloads

GameTooltipHooks triggering Lua errors when the addon DB isn't yet fully loaded

hollo6 opened this issue ยท 3 comments

commented

Getting the following LUA error spam on every login/reload with version r751.
Rolled back to r749 and it went away.

Stack trace:

50x Rarity/Core/Debugging.lua:14: attempt to index field 'db' (a nil value)
[Rarity/Core/Debugging.lua]:14: in function 'Debug'
[Rarity/Core/GUI/GameTooltipHooks.lua]:412: in function <Rarity/Core/GUI/GameTooltipHooks.lua:410>
[tail call]: ?
[C]: in function 'securecallfunction'
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:61: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:56>
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:81: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:77>
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:117: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:107>
[C]: in function 'SetAttribute'
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:142: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:135>
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:288: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:238>
[C]: in function 'securecallfunction'
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:235: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:234>
[tail call]: ?
[XLoot_Frame/Frame.lua]:229: in main chunk
Locals (extremely verbose):
self = <table> {
 lockouts_detailed = <table> {
 }
 modules = <table> {
 }
 string_methods = <table> {
 }
 Testing = <table> {
 }
 AddonCompartment = <table> {
 }
 HolidayEvents = <table> {
 }
 tempbagitems = <table> {
 }
 guids = <table> {
 }
 EventHandlers = <table> {
 }
 architems = <table> {
 }
 itemsMasterList = <table> {
 }
 relevantSpells = <table> {
 }
 GUI = <table> {
 }
 npcs_to_items = <table> {
 }
 catIcons = <table> {
 }
 isOpening = false
 string_types = <table> {
 }
 items_with_stats = <table> {
 }
 isFishing = false
 name = "Rarity"
 ItemDB = <table> {
 }
 used = <table> {
 }
 Statistics = <table> {
 }
 isPool = false
 isTradeskillOpen = false
 DatabaseSchema = <table> {
 }
 lockouts_holiday = <table> {
 }
 itemsToPrime = <table> {
 }
 string_archraces = <table> {
 }
 Announcements = <table> {
 }
 isTradeWindowOpen = false
 Database = <table> {
 }
 isGuildBankOpen = false
 Enum = <table> {
 }
 itemInfoCache = <table> {
 }
 Caching = <table> {
 }
 Collections = <table> {
 }
 baseName = "Rarity"
 pet_sources = <table> {
 }
 lockouts = <table> {
 }
 activeHolidayEvents = <table> {
 }
 mount_sources = <table> {
 }
 modulesEnabled = <table> {
 }
 CONSTANTS = <table> {
 }
 items = <table> {
 }
 defaultModuleState = true
 MapInfo = <table> {
 }
 Debugging = <table> {
 }
 CopyPastePopup = <table> {
 }
 Waypoints = <table> {
 }
 Validation = <table> {
 }
 Tracking = <table> {
 }
 opennodes = <table> {
 }
 zones = <table> {
 }
 enabledState = true
 Profiling = <table> {
 }
 tooltipOpenDelay = false
 stats_to_scan = <table> {
 }
 isAuctionHouseOpen = false
 ScrollingDebugMessageFrame = <table> {
 }
 fishnodes = <table> {
 }
 items_to_items = <table> {
 }
 isMailboxOpen = false
 Item = <table> {
 }
 defaultModuleLibraries = <table> {
 }
 Serialization = <table> {
 }
 bagitems = <table> {
 }
 Output = <table> {
 }
 fishzones = <table> {
 }
 orderedModules = <table> {
 }
 isBankOpen = false
 Utils = <table> {
 }
 Tooltips = <table> {
 }
 coins = <table> {
 }
 MINOR_VERSION = 751
 AuctionDB = <table> {
 }
 AreaPOIs = <table> {
 }
 collection_items = <table> {
 }
 miningnodes = <table> {
 }
 bosses = <table> {
 }
 Session = <table> {
 }
}
s = "Failed to set GameTooltip text (tooltip additions have been disabled)"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'db' (a nil value)"
DebugCache = <table> {
 messages = <table> {
 }
 cacheSize = 250
}
commented

Don't know why I didn't see r750 when going for the rollback, now I tried this version as well and it works too.

commented

That would happen if the addon DB (saved variables) isn't loaded fast enough. Can you try r751-alpha-2 to see if that fixes it?

Forcing the DB to be loaded before the addon should prevent any such problems in the future. Rolling back to the previous release isn't a long-term solution since I rewrote part of the tooltip code (and it shouldn't be necessary with the missing TOC change).

commented

Thanks for picking this up. I didn't mean rollback as a solution, just added it as information to confirm the version that introduced the bug.
I've tried alpha-2 and now getting the following LUA error on reload:
(sorry I can't figure out how to format the dump as nicely, same thing you did above didn't work)

5x Rarity/Core/GUI/GameTooltipHooks.lua:411: attempt to index field 'db' (a nil value)
[Rarity/Core/GUI/GameTooltipHooks.lua]:411: in function <Rarity/Core/GUI/GameTooltipHooks.lua:410>
[tail call]: ?
[C]: in function 'securecallfunction'
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:61: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:56>
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:81: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:77>
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:117: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:107>
[C]: in function 'SetAttribute'
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:142: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:135>
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:288: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:238>
[C]: in function 'securecallfunction'
[Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:235: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:234>
[tail call]: ?
[XLoot_Frame/Frame.lua]:229: in main chunk

Locals:
tooltip = XLootTooltip {
processingInfo =

{
}
infoList =
{
}
updateTooltipTimer = 0.200000
StatusBar = XLootTooltipStatusBar {
}
TextRight1 = XLootTooltipTextRight1 {
}
supportsDataRefresh = true
BottomOverlay = Texture {
}
NineSlice = Frame {
}
textLeft1Font = "GameTooltipHeaderText"
textRight2Font = "GameTooltipText"
TopOverlay = Texture {
}
layoutType = "TooltipDefaultLayout"
TextLeft1 = XLootTooltipTextLeft1 {
}
textRight1Font = "GameTooltipHeaderText"
textLeft2Font = "GameTooltipText"
TextRight2 = XLootTooltipTextRight2 {
}
TextLeft2 = XLootTooltipTextLeft2 {
}
}
tooltipData =
{
dataInstanceID = 29954
lines =
{
}
id = 52722
type = 0
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'db' (a nil value)"
R =
{
lockouts_detailed =
{
}
modules =
{
}
string_methods =
{
}
Testing =
{
}
AddonCompartment =
{
}
HolidayEvents =
{
}
tempbagitems =
{
}
guids =
{
}
EventHandlers =
{
}
architems =
{
}
itemsMasterList =
{
}
relevantSpells =
{
}
GUI =
{
}
npcs_to_items =
{
}
catIcons =
{
}
isOpening = false
string_types =
{
}
items_with_stats =
{
}
isFishing = false
name = "Rarity"
ItemDB =
{
}
used =
{
}
Statistics =
{
}
isPool = false
isTradeskillOpen = false
DatabaseSchema =
{
}
lockouts_holiday =
{
}
itemsToPrime =
{
}
string_archraces =
{
}
Announcements =
{
}
isTradeWindowOpen = false
Database =
{
}
isGuildBankOpen = false
Enum =
{
}
itemInfoCache =
{
}
Caching =
{
}
Collections =
{
}
baseName = "Rarity"
pet_sources =
{
}
lockouts =
{
}
activeHolidayEvents =
{
}
mount_sources =
{
}
modulesEnabled =
{
}
CONSTANTS =
{
}
items =
{
}
defaultModuleState = true
MapInfo =
{
}
Debugging =
{
}
CopyPastePopup =
{
}
Waypoints =
{
}
Validation =
{
}
Tracking =
{
}
opennodes =
{
}
zones =
{
}
enabledState = true
Profiling =
{
}
tooltipOpenDelay = false
stats_to_scan =
{
}
isAuctionHouseOpen = false
ScrollingDebugMessageFrame =
{
}
fishnodes =
{
}
items_to_items =
{
}
isMailboxOpen = false
Item =
{
}
defaultModuleLibraries =
{
}
Serialization =
{
}
bagitems =
{
}
Output =
{
}
fishzones =
{
}
orderedModules =
{
}
isBankOpen = false
Utils =
{
}
Tooltips =
{
}
coins =
{
}
MINOR_VERSION = 751
AuctionDB =
{
}
AreaPOIs =
{
}
collection_items =
{
}
miningnodes =
{
}
bosses =
{
}
Session =
{
}
}