LibArtifactData-1.0

206k Downloads

GetArtifactInfo() might return nil

Mitalie opened this issue ยท 16 comments

commented

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
commented

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.

commented

I can confirm the same message.

Steps to reproduce:

  1. On my Guardian Druid I use a weak aura that uses LibArtifactData:
  2. 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

commented

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.

commented

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?

commented

@AlexanderKenny what is the addon that uses the lib in your case?

commented

I can reliably reproduce by porting back and forth between Dalaran and my order hall on my mage. No other addons using the library.

commented

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.

commented

@AlexanderKenny AdiButtonsAuras is actually working fine on my side
@Mitalie I'll take a look there

commented

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.

commented

@Mitalie could you point me to a download location to the simulationcraft you mean. The one I found is not a wow addon

commented

Version 1.5.0 is the last one with LibArtifactData, see Other Downloads tab

commented

https://mods.curse.com/addons/wow/simulationcraft
It's a data export tool for the external program you probably found.

commented

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.

commented

@Mitalie can't reproduce with version 1.5.0 of SimulationCraft either.
@ateoto do you still experience the bug you mentioned?

commented

@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).

commented

@AlexanderKenny yep, Exorsus Raid Tools breaks it on zone change. I'll take a look tomorrow.