Error on game load: attempt to call method 'GetHealingPower' (a nil value)
KJee85 opened this issue ยท 6 comments
Find the error below. This seems to affect some of the stats being calculated properly as well as the coloring of items on character. I'm not super familiar with LUA semantics but I tried poking around a bit and here are my observations, given my lack of really any addon experience aside from wanting to poke around because the error was bugging me apologies if some of my thoughts are off base.
I tweaked line 98 so it just contatined the wrapped code in Data:GetHealingPower():
before - ["BonusHealing"] = function() return Data:GetHealingPower() end,
after - ["BonusHealing"] = function() return GetSpellBonusHealing() end,
This just caused the issue to shift to another entry in dataFunctionRefs so there is some sort of loading/timing issue going on. To me the way this Data file is set up is a bit wonky in general as its expecting that by the time it's being called the other files which define other Data: functions have loaded in, yet Data.lua is loaded first before these because they depend on functions in Data. My thought would be to flip this, move methods needed the various "data sub modules" like SpellCrit.lua into a standlone DataHelper module. Then could load all of these first and Data.lua last which now as it builds the above array those functions would exist. Either that or just the driving load that uses all of this needs to be adjusted but I'm not versed enough to nail it down and figure if its something dumb may be more obvious to folks who are.
Date: 2021-07-12 13:13:49
ID: 1
Error occured in: Global
Count: 1
Message: ...\AddOns\ExtendedCharacterStats\Modules\Data\Data.lua line 98:
attempt to call method 'GetHealingPower' (a nil value)
Debug:
[string "@ExtendedCharacterStats\Modules\Data\Data.lua"]:98:
...\AddOns\ExtendedCharacterStats\Modules\Data\Data.lua:98
[string "=(tail call)"]: ?
[string "@ExtendedCharacterStats\Modules\Stats.lua"]:167:
...face\AddOns\ExtendedCharacterStats\Modules\Stats.lua:165
[string "@ExtendedCharacterStats\Modules\Stats.lua"]:159:
...face\AddOns\ExtendedCharacterStats\Modules\Stats.lua:148
[string "@ExtendedCharacterStats\Modules\Stats.lua"]:224:
...face\AddOns\ExtendedCharacterStats\Modules\Stats.lua:184
[string "@ExtendedCharacterStats\Modules\Stats.lua"]:104: CreateWindow()
[string "@ExtendedCharacterStats\ECS.lua"]:126:
ExtendedCharacterStats\ECS.lua:124
[string "@ExtendedCharacterStats\ECS.lua"]:37:
ExtendedCharacterStats\ECS.lua:30
Locals:
(*temporary) = nil
(*temporary) =
HUNTER = 3
FIRE_SCHOOL = 3
HOLY_SCHOOL = 2
ROGUE = 4
MAGE = 8
IsSetBonusActive = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\ItemSets.lua:115
GetRangedAttackSpeed = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Ranged.lua:28
SpellHitBonus = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\SpellHit.lua:128
GetBlockValue = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Defense.lua:61
SpellHitRating = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\SpellHit.lua:139
DRUID = 11
GetMP5FromSpirit = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\MP5.lua:67
GetResilienceValue = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Defense.lua:69
MeleeHitBonus = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:33
SpellMissChanceBossLevel = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\SpellHit.lua:26
SpellMissChanceSameLevel = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\SpellHit.lua:8
GetSpellPenetration = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\SpellCrit.lua:160
RangeHitRating = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Ranged.lua:39
GetSpellCrit = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\SpellCrit.lua:12
RangeMissChanceBossLevel = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Ranged.lua:104
SHAMAN = 7
WARLOCK = 9
GetParryChance = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Defense.lua:51
RangeHitBonus = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Ranged.lua:44
RangedCrit = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Ranged.lua:34
GetMP5FromBuffs = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\MP5.lua:155
GetRangeAttackPower = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Ranged.lua:13
HasNatureCritBonusModifier = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\ItemSets.lua:100
MeleeHitMissChanceSameLevel = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:110
SHADOW_SCHOOL = 6
GetBlockChance = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Defense.lua:56
GetMP5WhileCasting = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\MP5.lua:78
NATURE_SCHOOL = 4
ARCANE_SCHOOL = 7
GetArmorValue = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Defense.lua:10
GetExpertise = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:164
PALADIN = 2
MeleeHitRating = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:38
MeleeCrit = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:28
private =
}
GetMeleeAttackSpeedOffHand = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:22
MeleeHitMissChanceBossLevel = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:137
GetMeleeAttackPower = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:10
GetMovementSpeed = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\General.lua:8
GetDodgeChance = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Defense.lua:46
WARRIOR = 1
FROST_SCHOOL = 5
GetMeleeAttackSpeedMainHand = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Melee.lua:16
HasSetBonusModifierBlockValue = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\ItemSets.lua:107
RangeMissChanceSameLevel = defined @interface\AddOns\ExtendedCharacterStats\Modules\Data\Ranged.
AddOns:
Swatter, v1.13.6652 (SwimmingSeadragon)
AtlasLootClassic, vv2.3.1-bcc
AtlasLootClassicData, vv2.3.1-bcc
AtlasLootClassicDungeonsAndRaids, vv2.3.1-bcc
Attune, v230
AucAdvanced, v1.13.6717 (SwimmingSeadragon)
AucFilterBasic, v1.13.6680 (SwimmingSeadragon)
AucStatHistogram, v1.13.6681 (SwimmingSeadragon)
AucStatiLevel, v1.13.6705 (SwimmingSeadragon)
AucStatPurchased, v1.13.6672 (SwimmingSeadragon)
AucStatSimple, v1.13.6634 (SwimmingSeadragon)
AucStatStdDev, v1.13.6635 (SwimmingSeadragon)
AucUtilFixAH, v1.13.6608 (SwimmingSeadragon)
BagBrother, v
Bagnon, v9.1.0
Bartender4, v4.10.10
BeanCounter, v1.13.6682 (SwimmingSeadragon)
CEPGP, v
DBMCore, v2.5.8-7-g7bbf571
DBMStatusBarTimers, v
Details, v
DetailsStreamer, v
DetailsTinyThreat, v
EnchantrixBarker, v1.13.6697 (SwimmingSeadragon)
ExRT, v4520
ExtendedCharacterStats, v2.8.4
GatherMate2, v1.46.1-classic-1-gb92546a
GTFO, v4.63
HealBot, v2.5.1.13
HealBotData, v2.5.1.13
HealBoten, v2.5.1.13
HealBotOptions, v2.5.1.13
HealBotTips, v2.5.1.13
Immersion, v1.3.7
Informant, v1.13.6684 (SwimmingSeadragon)
LeatrixMaps, v2.5.45
LootReserve, v2021-07-09
NovaInstanceTracker, v1.19
NovaWorldBuffs, v2.11
OmniCC, v9.1.0
Questie, v6.3.14
ShadowedUnitFrames, vv4.3.1-classic-2-g9302929
SlideBar, v1.13.6668 (SwimmingSeadragon)
SpeedyAutoLoot, v2.1.1
Stubby, v1.13.6614 (SwimmingSeadragon)
WeakAuras, v3.5.0-13-g2c51f20
WeakAurasCompanion, v1.1.0
BlizRuntimeLib_enUS v2.5.1.20501
(ck=5f4)
Data:GetHealingPower() is caling a function from SpellDamage.lua which calls the GetSpellBonusHealing() already. I also tried what you did, to no avail. I am noticing this bug cuts off the Spell Power section completely due to this bug. Hope it gets fixed soon.
Yeah, I just wanted to ensure issue wasn't somewhere in the wrapper, but its some issue with how functions like Data:GetHealingPower() are defined across files like SpellDamage.lua it's not getting set. Moving this just causes the same error for a different one of the wrapper functions built out in dataFunctionRefs.
From my stack you can see actually see some of them are defined and come from the relevant sub components so I'm guessing its some sort of timing issue but just don't know enough about Lua lifecycle flow to know what is up there
@KJee85 Could you test the latest version and see if this error is fixed? I wasn't able to reproduce it, but tried to improve the logic towards it.