Demonolgy Error Version: 8.0.2.00-97-gc030eae
Fraktyl opened this issue ยท 7 comments
Getting the following error when loading into the world or a dungeon:
11x HeroLib\Class\Spell\Main.lua:142: attempt to get length of local 'CostInfos' (a nil value)
HeroLib\Class\Spell\Main.lua:142: in function IsUsableP' HeroLib\Class\Spell\Main.lua:217: in function
IsReadyP'
HeroRotation_Warlock\Demonology.lua:194: in function Precombat' HeroRotation_Warlock\Demonology.lua:449: in function
?'
HeroRotation\Main.lua:439: in function <HeroRotation\Main.lua:417>
Locals:
self =
LastRemovedFromPlayerTime = 0
LastAppliedOnPlayerTime = 0
SpellType = "Player"
LastHitTime = 0
LastCastTime = 0
LastDisplayTime = 12791.787000
SpellID = 30146
}
Offset = nil
CostInfos = nil
Usable = true
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to get length of local 'CostInfos' (a nil value)"
Player =
UseCache = true
ChiDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:581
Race = defined @herolib\Class\Unit\Player\Main.lua:34
Insanityrain = defined @herolib\Class\Unit\Player\Power.lua:632
FocusLossOnCastEnd = defined @herolib\Class\Unit\Player\Power.lua:218
PainMax = defined @herolib\Class\Unit\Player\Power.lua:706
IsInVehicle = defined @herolib\Class\Unit\Player\Main.lua:92
EnergyDeficit = defined @herolib\Class\Unit\Player\Power.lua:271
Fury = defined @herolib\Class\Unit\Player\Power.lua:680
InstanceInfo = defined @herolib\Class\Unit\Player\Instance.lua:69
RageDeficit = defined @herolib\Class\Unit\Player\Power.lua:131
VersatilityDmgPct = defined @herolib\Class\Unit\Player\Stat.lua:98
ArcaneChargesDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:664
MaelstromPercentage = defined @herolib\Class\Unit\Player\Power.lua:541
ArcaneCharges = defined @herolib\Class\Unit\Player\Power.lua:649
ActiveMitigationNeeded = defined @herolib\Class\Unit\Player\Tank.lua:57
SoulShardsDeficit = defined @herolib\Class\Unit\Player\Power.lua:459
IsInWhitelistedVehicle = defined @herolib\Class\Unit\Player\Main.lua:121
PainDeficit = defined @herolib\Class\Unit\Player\Power.lua:721
AttackPower = defined @herolib\Class\Unit\Player\Stat.lua:57
FocusCastRegen = defined @herolib\Class\Unit\Player\Power.lua:200
PainDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:726
PrevOffGCD = defined @herolib\Events\Prev_Spell.lua:150
MasteryPct = defined @herolib\Class\Unit\Player\Stat.lua:93
InsanityPercentage = defined @herolib\Class\Unit\Player\Power.lua:617
ManaDeficitPercentageP = defined @herolib\Class\Unit\Player\Power.lua:105
FuryDeficit = defined @herolib\Class\Unit\Player\Power.lua:690
PrevGCD = defined @herolib\Events\Prev_Spell.lua:128
AstralPowerMax = defined @herolib\Class\Unit\Player\Power.lua:470
IsMounted = defined @herolib\Class\Unit\Player\Main.lua:23
EnergyRegenPercentage = defined @herolib\Class\Unit\Player\Power.lua:281
RunicPowerDeficit = defined @herolib\Class\Unit\Player\Power.lua:380
FuryPercentage = defined @herolib\Class\Unit\Player\Power.lua:685
Insanity = defined @herolib\Class\Unit\Player\Power.lua:612
EnergyTimeToMaxPredicted = defined @herolib\Class\Unit\Player\Power.lua:328
ArcaneChargesPercentage = defined @herolib\Class\Unit\Player\Power.lua:654
AstralPowerDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:491
MaelstromDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:551
FuryDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:695
UnitNPCID = -2
I'm unable to replicate your error. I do think I see what's happening, though.
Long Version: The error seems to be stemming from the first item in the Precombat function. That item (checking/suggesting summing of your pet) calls the IsReadyP function from HeroLib. IsReadyP checks if IsCastableP and IsUsableP are true. As you can see in your error, IsUsableP is causing a problem. IsUsableP pulls the mana cost of spells from the WoW API function GetSpellPowerCost and stores that information into a variable. That variable isn't being filled for some reason, which is why you get the nil value error.
Short Version: HeroRotation is trying to pull data from WoW before WoW is able to provide that information.
The Problem: I don't think this is something we can resolve. I'm not sure why an addon would load before the API is able to respond to requests. I'll leave the issue open for a few days, just in case any of the other devs have an idea.
Is that the same as this?
3x HeroLib\Class\Spell\Main.lua:144: attempt to get length of local 'CostTable' (a nil value) HeroLib\Class\Spell\Main.lua:144: in function
IsUsableP'
HeroLib\Class\Spell\Main.lua:221: in function IsReadyP' HeroRotation_Warlock\Demonology.lua:199: in function
Precombat'
HeroRotation_Warlock\Demonology.lua:454: in function `?'
HeroRotation\Main.lua:439: in function <HeroRotation\Main.lua:417>
Locals:
self =
LastRemovedFromPlayerTime = 0
LastAppliedOnPlayerTime = 0
SpellType = "Player"
LastHitTime = 0
LastCastTime = 0
LastDisplayTime = 0
SpellID = 30146
}
Offset = nil
CostTable = nil
Usable = true
(*temporary) = 30146
(*temporary) =
CooldownInfo =
}
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = 30146
(*temporary) = nil
(*temporary) = "attempt to get length of local 'CostTable' (a nil value)"
Player =
UseCache = true
ChiDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:581
Race = defined @herolib\Class\Unit\Player\Main.lua:34
Insanityrain = defined @herolib\Class\Unit\Player\Power.lua:632
FocusLossOnCastEnd = defined @herolib\Class\Unit\Player\Power.lua:218
PainMax = defined @herolib\Class\Unit\Player\Power.lua:706
IsInVehicle = defined @herolib\Class\Unit\Player\Main.lua:92
EnergyDeficit = defined @herolib\Class\Unit\Player\Power.lua:271
Fury = defined @herolib\Class\Unit\Player\Power.lua:680
InstanceInfo = defined @herolib\Class\Unit\Player\Instance.lua:69
RageDeficit = defined @herolib\Class\Unit\Player\Power.lua:131
VersatilityDmgPct = defined @herolib\Class\Unit\Player\Stat.lua:98
ArcaneChargesDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:664
MaelstromPercentage = defined @herolib\Class\Unit\Player\Power.lua:541
ArcaneCharges = defined @herolib\Class\Unit\Player\Power.lua:649
ActiveMitigationNeeded = defined @herolib\Class\Unit\Player\Tank.lua:57
SoulShardsDeficit = defined @herolib\Class\Unit\Player\Power.lua:459
IsInWhitelistedVehicle = defined @herolib\Class\Unit\Player\Main.lua:121
PainDeficit = defined @herolib\Class\Unit\Player\Power.lua:721
AttackPower = defined @herolib\Class\Unit\Player\Stat.lua:57
FocusCastRegen = defined @herolib\Class\Unit\Player\Power.lua:200
PainDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:726
PrevOffGCD = defined @herolib\Events\Prev_Spell.lua:150
MasteryPct = defined @herolib\Class\Unit\Player\Stat.lua:93
InsanityPercentage = defined @herolib\Class\Unit\Player\Power.lua:617
ManaDeficitPercentageP = defined @herolib\Class\Unit\Player\Power.lua:105
FuryDeficit = defined @herolib\Class\Unit\Player\Power.lua:690
PrevGCD = defined @herolib\Events\Prev_Spell.lua:128
AstralPowerMax = defined @herolib\Class\Unit\Player\Power.lua:470
IsMounted = defined @herolib\Class\Unit\Player\Main.lua:23
EnergyRegenPercentage = defined @herolib\Class\Unit\Player\Power.lua:281
RunicPowerDeficit = defined @herolib\Class\Unit\Player\Power.lua:380
FuryPercentage = defined @herolib\Class\Unit\Player\Power.lua:685
Insanity = defined @herolib\Class\Unit\Player\Power.lua:612
EnergyTimeToMaxPredicted = defined @herolib\Class\Unit\Player\Power.lua:328
ArcaneChargesPercentage = defined @herolib\Class\Unit\Player\Power.lua:654
AstralPowerDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:491
MaelstromDeficitPercentage = defined @herolib\Class\Unit\Player\Power.lua:551
FuryDeficitPercentage = defined @HeroLib`
It is effectively the same error. I'm not sure what situation can cause the addon to try to load an icon prior to pulling the spell data from the WoW API. I've had the error occur on my Warlock, but can't reliably replicate the error. I'm also not sure why it's only happening to Demonology. I'm not aware of any other spec giving a similar error.
On a whim I ran back in game, and found it surprisingly easy to replicate... by dismissing my pet. The BfA city portals make it easy to bamf back and forth. Having any pet called prevented the error.
I don't know if that helps, but maybe it's a place to start? It may have something to do with whether you have the pet summoned before you take the portal or not.
Further testing... went to Silithus, had pet summoned. Mounted, flew so pet despawned, then took the portal back... and error. But now I can confirm it's not pet specific, just Demo in general.
This should be fixed as of commit 366510f
Please let me know if you have any further issues.
That does help with replicating the issue. It was previously reported (and I'd only personally seen it) as an issue when first logging in. I wasn't able to get it to replicate reliably upon login, however, it does seem that using a teleport while not having a demon summoned does reliably replicate it.
I'll look into a couple of fixes.