LUA error when changing tabs from Crafting Orders to Recipes
hollo6 opened this issue ยท 8 comments
Getting the below LUA error every time when doing the following:
- Go to Crafting Orders tab, either Public or Private.
- Open a work order, either click Start Order or not, both cases produce the error.
- Go to Recipes tab.
- Observe error:
1x ...Ons/CraftSim/Modules/AverageProfit/AverageProfit.lua:82: bad argument #1 to 'pairs' (table expected, got nil)
[string "=[C]"]: in function pairs' [string "@CraftSim/Modules/AverageProfit/AverageProfit.lua"]:82: in function
GetExpectedQualityBySkill'
[string "@CraftSim/Pricing/ProfitCalculation.lua"]:334: in function GetAverageProfit' [string "@CraftSim/Modules/AverageProfit/AverageProfit.lua"]:96: in function
CalculateStatWeights'
[string "@CraftSim/Main/CraftSim.lua"]:582: in function TriggerModulesByRecipeType' [string "@CraftSim/Main/CraftSim.lua"]:165: in function
TriggerModulesErrorSafe'
[string "@CraftSim/Main/CraftSim.lua"]:199: in function <CraftSim/Main/CraftSim.lua:183>
[string "=[C]"]: ?
[string "=[C]"]: in function Init' [string "@Blizzard_ProfessionsTemplates/Blizzard_ProfessionsRecipeSchematicForm.lua"]:191: in function <...emplates/Blizzard_ProfessionsRecipeSchematicForm.lua:185> [string "=[C]"]: in function
SetShown'
[string "@SharedXML/TabSystem/TabSystemOwner.lua"]:33: in function SetTab' [string "@SharedXML/TabSystem/TabSystemOwner.lua"]:69: in function
SetTab'
[string "@Blizzard_Professions/Blizzard_ProfessionsFrame.lua"]:368: in function <...s/Blizzard_Professions/Blizzard_ProfessionsFrame.lua:284>
[string "=(tail call)"]: ?
[string "@SharedXML/TabSystem/TabSystemTemplates.lua"]:175: in function `SetTab'
[string "@SharedXML/TabSystem/TabSystemTemplates.lua"]:98: in function <SharedXML/TabSystem/TabSystemTemplates.lua:95>
[string "=[C]"]: ?
Locals:
(*temporary) = nil
(*temporary) = "table expected, got nil"
= defined =[C]:-1
Hm I cannot reproduce this
I made a work order for a blue axe on one of my alts for my blacksmith
then I switched to the blacksmith and went to the blacksmithing table
opened work orders-> personal -> the work order to see the details
then switched back and forth between recipe tab and work order but no error
Does not change when the order is started
I think it's not for every item or every profession, I always get this for Engineering orders but usually not for BS or LW, I think I also had this for Tailoring.
Same thing just happened when trying to complete a Personal LW order for a Lavish Floral Pack recraft.
I didn't start the order, just opened it and then switched to the Recipes tab. Got this error:
8x ...Ons/CraftSim/Modules/AverageProfit/AverageProfit.lua:82: bad argument #1 to 'pairs' (table expected, got nil)
[string "=[C]"]: in function pairs' [string "@CraftSim/Modules/AverageProfit/AverageProfit.lua"]:82: in function
GetExpectedQualityBySkill'
[string "@CraftSim/Pricing/ProfitCalculation.lua"]:334: in function GetAverageProfit' [string "@CraftSim/Modules/AverageProfit/AverageProfit.lua"]:96: in function
CalculateStatWeights'
[string "@CraftSim/Main/CraftSim.lua"]:582: in function TriggerModulesByRecipeType' [string "@CraftSim/Main/CraftSim.lua"]:165: in function
TriggerModulesErrorSafe'
[string "@CraftSim/Main/CraftSim.lua"]:199: in function <CraftSim/Main/CraftSim.lua:183>
[string "=[C]"]: ?
[string "=[C]"]: in function Init' [string "@Blizzard_ProfessionsTemplates/Blizzard_ProfessionsRecipeSchematicForm.lua"]:191: in function <...emplates/Blizzard_ProfessionsRecipeSchematicForm.lua:185> [string "=[C]"]: in function
SetShown'
[string "@SharedXML/TabSystem/TabSystemOwner.lua"]:33: in function SetTab' [string "@SharedXML/TabSystem/TabSystemOwner.lua"]:69: in function
SetTab'
[string "@Blizzard_Professions/Blizzard_ProfessionsFrame.lua"]:368: in function <...s/Blizzard_Professions/Blizzard_ProfessionsFrame.lua:284>
[string "=(tail call)"]: ?
[string "@SharedXML/TabSystem/TabSystemTemplates.lua"]:175: in function `SetTab'
[string "@SharedXML/TabSystem/TabSystemTemplates.lua"]:98: in function <SharedXML/TabSystem/TabSystemTemplates.lua:95>
[string "=[C]"]: ?
Locals:
(*temporary) = nil
(*temporary) = "table expected, got nil"
= defined =[C]:-1
Probably worth mentioning that I have Tuskarr Beanbag Favorited and that's where the Recipes tab opens by default.
Also it is 100% reproducible this way.
After a little more testing, if I leave some filter on in the Recipes tab which causes it to open some other recipe when switched to (Life-Bound Belt, in this case), the error won't pop up.
Since the time of opening this ticket, I have had this happen many times. A way to steadiliy reproduce the fault:
- Send a (Public or Private) Work Order for some equipment (armor or weapon)
- On the crafting toon, favorite a Recipe that is not an equipment (toy, pet, etc)
- Open Crafting Orders tab and open the order (either start it or not)
- Switch to Recipes tab
- Observe error
It's probably happening the other way around (order for toy, favorite an equipment) too but I had little luck testing that scenario. I am willing to, though, if that helps.
I'm still getting this in v8 of CraftSim. Same scenario as in the last comment. Engineering, favorited the Atomic Recalibrator, got a work order, started the order, swapped tabs, got the error.
2x ...Ons/CraftSim/Modules/AverageProfit/AverageProfit.lua:82: bad argument #1 to 'pairs' (table expected, got nil)
[string "=[C]"]: in function `pairs'
[string "@CraftSim/Modules/AverageProfit/AverageProfit.lua"]:82: in function `GetExpectedQualityBySkill'
[string "@CraftSim/Pricing/ProfitCalculation.lua"]:362: in function `GetAverageProfit'
[string "@CraftSim/Modules/AverageProfit/AverageProfit.lua"]:94: in function `CalculateStatWeights'
[string "@CraftSim/Main/CraftSim.lua"]:620: in function `TriggerModulesByRecipeType'
[string "@CraftSim/Main/CraftSim.lua"]:189: in function `TriggerModulesErrorSafe'
[string "@CraftSim/Main/CraftSim.lua"]:234: in function <CraftSim/Main/CraftSim.lua:207>
[string "=[C]"]: ?
[string "=[C]"]: in function `Init'
[string "@Blizzard_ProfessionsTemplates/Blizzard_ProfessionsRecipeSchematicForm.lua"]:191: in function <...emplates/Blizzard_ProfessionsRecipeSchematicForm.lua:185>
[string "=[C]"]: in function `SetShown'
[string "@SharedXML/TabSystem/TabSystemOwner.lua"]:33: in function `SetTab'
[string "@SharedXML/TabSystem/TabSystemOwner.lua"]:69: in function `SetTab'
[string "@Blizzard_Professions/Blizzard_ProfessionsFrame.lua"]:368: in function <...s/Blizzard_Professions/Blizzard_ProfessionsFrame.lua:284>
[string "=(tail call)"]: ?
[string "@SharedXML/TabSystem/TabSystemTemplates.lua"]:175: in function `SetTab'
[string "@SharedXML/TabSystem/TabSystemTemplates.lua"]:98: in function <SharedXML/TabSystem/TabSystemTemplates.lua:95>
[string "=[C]"]: ?
Locals:
(*temporary) = nil
(*temporary) = "table expected, got nil"
= <function> defined =[C]:-1