GetArtifactInfo() might return nil
Mitalie opened this issue ยท 16 comments
Shortly after obtaining my first artifact, I started getting the error below. After checking your code I tried manually calling C_ArtifactUI.GetArtifactInfo() and got nil as the return value. I was also unable to open the artifact UI, so this is most likely triggered by a Blizzard bug. Both problems were fixed by restarting the game, but maybe you could add a nil guard to prevent user confusion.
FrameXML\MainMenuBar.lua:126: Usage: GetCostForPointAtRank(rank)
[C]: in function `GetCostForPointAtRank'
FrameXML\MainMenuBar.lua:126: in function <FrameXML\MainMenuBar.lua:124>
...aft\libs\LibArtifactData-1.0\LibArtifactData-1.0-5.lua:234: in function <...aft\libs\LibArtifactData-1.0\LibArtifactData-1.0.lua:229>
...aft\libs\LibArtifactData-1.0\LibArtifactData-1.0-5.lua:295: in function <...aft\libs\LibArtifactData-1.0\LibArtifactData-1.0.lua:282>
...aft\libs\LibArtifactData-1.0\LibArtifactData-1.0-5.lua:396: in function `?'
...aft\libs\LibArtifactData-1.0\LibArtifactData-1.0-5.lua:67: in function <...aft\libs\LibArtifactData-1.0\LibArtifactData-1.0.lua:67>
Locals:
(*temporary) = nil
I just got this error again after the first zone change loading screen. Same problem with Blizzard UI, too, but this doesn't seem to be a rare one-time bug like I first thought.
I can confirm the same message.
Steps to reproduce:
- On my Guardian Druid I use a weak aura that uses LibArtifactData:
- Enter combat
ElvUI informs me that there are Lua errors. If I stay in combat Blizzard will inform me of the "High number of errors" message.
This is the error:
Message: Interface\FrameXML\MainMenuBar.lua:126: Usage: GetCostForPointAtRank(rank)
Time: 08/31/16 13:06:36
Count: 339
Stack: [C]: ?
[C]: in function `GetCostForPointAtRank'
Interface\FrameXML\MainMenuBar.lua:126: in function <Interface\FrameXML\MainMenuBar.lua:124>
...e\AddOns\LibArtifactData-1.0\LibArtifactData-1.0.lua:234: in function <...e\AddOns\LibArtifactData-1.0\LibArtifactData-1.0.lua:229>
...e\AddOns\LibArtifactData-1.0\LibArtifactData-1.0.lua:295: in function <...e\AddOns\LibArtifactData-1.0\LibArtifactData-1.0.lua:282>
...e\AddOns\LibArtifactData-1.0\LibArtifactData-1.0.lua:496: in function `ForceUpdate'
[string "return function(...)..."]:38: in function <[string "return function(...)..."]:1>
Interface\AddOns\WeakAuras\RegionTypes\icon.lua:251: in function `UpdateCustomText'
Interface\AddOns\WeakAuras\WeakAuras.lua:2930: in function <Interface\AddOns\WeakAuras\WeakAuras.lua:2926>
Locals:
Like mitalie I am also unable to access the Artifact UI until doing a /reload
I'm currently on vacation and don't have access to WoW. I will be back on Sunday, so sadly I can't do much until then.
Any way to reliably reproduce this?
I acquired my first artifact on my hunter, changed zones, reloaded the ui, swapped for non-artifact weapons, all with no errors at all.
Also, do you have other addons doing artifacts related stuff?
@AlexanderKenny what is the addon that uses the lib in your case?
I can reliably reproduce by porting back and forth between Dalaran and my order hall on my mage. No other addons using the library.
Oops I accidentally posted this on the wrong ticket! I believe it is Dominos_Progress and/or AdibuttonAuras not accounting for a nil return and meant to post on their tickets. I don't believe it is an issue with the library. Sorry for the mistake.
@AlexanderKenny AdiButtonsAuras is actually working fine on my side
@Mitalie I'll take a look there
Simulationcraft removed LibArtifactData-1.0 dependency in the latest alpha version, but I'll reinstall the previous version and see if it's still happening.
@Mitalie could you point me to a download location to the simulationcraft you mean. The one I found is not a wow addon
https://mods.curse.com/addons/wow/simulationcraft
It's a data export tool for the external program you probably found.
I don't seem to be able to trigger the error anymore. While I realized that C_ArtifactUI.GetArtifactInfo() returning nil without the artifact UI open was expected, the fact that artifact UI didn't open when shift-rightclicking on the artifact still makes me believe this was a Blizzard bug. A guildmate also had the problem of artifact UI not opening, which went away when he deleted his Cache folder. He didn't mention any lua errors so I assume he doesn't have LibArtifactData. I didn't delete my cache, so either some invalid data got evicted from my cache naturally, or the guildmate's timing coincided with a hotfix that fixed the issue.
@Rainrider On further inspection it seems like it may be Exorsus Raid Tools breaking any other addons that try and check artifact power. Try running it with an addon using your library and you should be able to reproduce the issue by travelling between zones (though it is entirely on them to fix as they have implemented their AP check horribly).
@AlexanderKenny yep, Exorsus Raid Tools breaks it on zone change. I'll take a look tomorrow.