Skillet

Skillet

112k Downloads

Intermittent error - related to Tradeskill World Quests?

brykrys opened this issue ยท 4 comments

commented

Version: 4.25-alpha1
enUS v9.0.2.90002

Received this error on completing today's Cooking WQ (Skewered Meats) - but only on one character, so it appears the error is intermittent. I at first assumed it had something to do with the recipes being unlearned after completing the quest.

Message: ..\AddOns\Skillet\UI\MainFrame.lua line 1712:
attempt to index local 'newInfo' (a nil value)
Debug:
[string "@Skillet\UI\MainFrame.lua"]:1712: UpdateDetailsWindow()
[string "@Skillet\UI\MainFrame.lua"]:921: UpdateTradeSkillWindow()
[string "@Skillet\Skillet.lua"]:1256: ShowTradeSkillWindow()
[string "@Skillet\Skillet.lua"]:1044: SkilletShowWindow()
[string "@Skillet\Skillet.lua"]:888: ?()
[string "@!KalielsTracker\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:119:
...ker\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:119
[string "=[C]"]: ?
[string "@!KalielsTracker\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:29:
...ker\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:25
[string "@!KalielsTracker\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:64: Fire()
[string "@TradeSkillInfo\Libs\AceEvent-3.0\AceEvent-3.0.lua"]:120:
...ns\TradeSkillInfo\Libs\AceEvent-3.0\AceEvent-3.0.lua:119

newInfo gets assigned at line 1687: C_TradeSkillUI.GetRecipeInfo(recipe.spellID)
so the Blizzard function is unexpectedly returning nil

Looking further back, 'recipe' could be set to Skillet.unknownRecipe, which would likely cause this result.

Looking even deeper, I note that the functionSkillet:GetSkill (SkilletData.lua ~530+) could potentially return a value of Skillet.unknownRecipe (line 570), which seems wrong as it's supposed to be returning skll data...

commented

That whole section should probably be rewritten.

Skillet.unknownRecipe is a table used by functions that are supposed to return a table and unless something screwy happens, it should never be used. However, you just found a screwy case :-)

I don't know if this will be any better but here's an attempt at rewriting that section. Since its intermittent, two testers are better than one. It will probably appear in the next build after I test it for a while. Let me know if you see any errors.

MainFrame.zip

commented

I have installed your test version and will test.

I do now suspect the error was something pretty rare, so just doing a nil check on 'newInfo' may be enough (assuming something later on won't break by doing this, of course!)

commented

I like this new code better.

commented

Skillet-4.26-alpha1 should fix this issue.