Recipe Master

Recipe Master

9.3k Downloads

Failure to correctly cache / load recipe information

Closed this issue ยท 11 comments

commented

The first time I opened Recipe Master 2.0.0 to my professions in vanilla Classic Era, it worked as intended. The second time in the same session, I got the following error in BugSack and the RM window didn't open.

4x ...ddOns/RecipeMaster/Source/Handlers/RecipeHandler.lua:97: attempt to index local 'recipeName' (a nil value)
[string "@RecipeMaster/Source/Handlers/RecipeHandler.lua"]:97: in function <...ddOns/RecipeMaster/Source/Handlers/RecipeHandler.lua:95>
[string "@RecipeMaster/Source/Handlers/RecipeHandler.lua"]:112: in function <...ddOns/RecipeMaster/Source/Handlers/RecipeHandler.lua:105>
[string "@RecipeMaster/Source/Handlers/RecipeHandler.lua"]:117: in function <...ddOns/RecipeMaster/Source/Handlers/RecipeHandler.lua:116>
[string "@RecipeMaster/Source/Handlers/RecipeHandler.lua"]:139: in function <...ddOns/RecipeMaster/Source/Handlers/RecipeHandler.lua:136>
[string "@RecipeMaster/Source/Handlers/RecipeHandler.lua"]:156: in function `getProfessionRecipes'
[string "@RecipeMaster/Source/Display/RecipesDisplay.lua"]:109: in function `showProfessionRecipes'
[string "@RecipeMaster/Source/Management/RecipesFrameManager.lua"]:74: in function `updateRecipeDisplay'
[string "@RecipeMaster/Source/Management/RecipesFrameManager.lua"]:84: in function `showRecipesFrame'
[string "@RecipeMaster/Source/Handlers/EventHandler.lua"]:45: in function <RecipeMaster/Source/Handlers/EventHandler.lua:44>
[string "@RecipeMaster/Source/Handlers/EventHandler.lua"]:58: in function <RecipeMaster/Source/Handlers/EventHandler.lua:57>

Locals:
recipeName = nil
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 1 = "Recipe: "
 2 = "Plans: "
 3 = "Formula: "
 4 = "Schematic: "
 5 = "Pattern: "
 6 = "Manual: "
}
(for control) = 1
_ = 1
prefix = "Recipe: "
(*temporary) = 1
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index local 'recipeName' (a nil value)"
L = <table> {
 minimum = "Minimum"
 trainer = "Trainer"
 general = "General"
 zone = "Zone"
 price = "Price"
 canLearn = "Learnable"
 skill = "Skill"
 rare = "Rare"
 uniqueSourceInstructions = <table> {
 }
 boss = "Boss"
 pickpocket = "Pickpocket"
 learned = "Learned"
 congratulations = "Congratulations!"
 orange = "Orange"
 quality = "Quality"
 hideWindow = "Hide"
 subtitle = "Created by Breno Ludgero
Version 2.0.0"
 stock = "Stock"
 common = "Common"
 updateIconDropdown = "Restore Window Icon"
 showRecipesInfo = "Show Recipe Details"
 showLearned = "Show Learned Recipes"
 recipesWindow = "Recipes Window"
 purchasableRecipe = "This recipe is sold by an NPC"
 recipeIconSpacing = "Icon Spacing"
 title = "Recipe Master"
 purple = "Purple"
 epic = "Epic"
 recipePrefixes = <table> {
 }
 progressBar = "Progress Bar"
 brightness = "Brightness"
 gray = "Gray"
 crafters = "Crafters:"
 bright = "Bright"
 color = "Color"
 backgroundOpacity = "Background Opacity"
 recipes = "Recipes"
 professions = <table> {
 }
 vendor = "Vendor"
 dungeon = "Dungeon"
 unknown = "Unknown"
 item = "Item"
 drop = "Loot"
 resetDefaults = "Reset To Default"
 level = "Level"
 quest = "Quest"
 rareElite = "Rare Elite"
 unique = "Unique"
 fishingNotLearned = "Spell not learned"
 blue = "Blue"
 sources = "Sources"
 fishing = "Fishing"
 chance = "Chance"
 uncommon = "Uncommon"
 dark = "Dark"
 show = "Show"
 elite = "Elite"
 object = "Object"
 green = "Green"
 unlearned = "Unlearned:"
 sortBy = "Sort:"
 name = "Name"
 unlimited = "Unlimited"
}
capitalizeName = <function> defined @RecipeMaster/Source/Handlers/RecipeHandler.lua:89
commented

Hello, @Myrroddin
I'm having a hard time recreating this error. Could you please provide the additional information below from the time you got the error?

  • What primary professions did you character had learned?
  • Was an add-on like Skillet or TSM enabled?
commented

I know blacksmithing, mining, cooking, and first aid. Yes, only blacksmithing and mining are primary. I'm being complete. None of them are capped. Just in case it matters, I opened blacksmithing first.

I use TSM, and tested switching from its UI to Blizzard's UI using TSM's button. Even after restarting the game, I could not recover Recipe Master; whatever triggered the error likely is saved in Recipe Master's saved variables because it fails on load.

commented

This is my saved variables file for Classic Era. I do not play hardcore or SoD. This is vanilla.

RecipeMasterProfessionsAndSkills = {
["Mankrik"] = {
["Sygon"] = {
[186] = {
["skills"] = {
3577,
3860,
3859,
3575,
2842,
2841,
3576,
2840,
},
["level"] = 221,
["specialization"] = false,
["rank"] = "Artisan",
},
[356] = {
["skills"] = {
},
["level"] = 185,
["specialization"] = false,
["rank"] = "Expert",
},
[185] = {
["skills"] = {
2679,
2681,
6888,
6290,
2680,
5525,
2684,
724,
733,
2683,
2687,
3663,
4593,
5095,
21072,
2685,
3220,
2682,
3662,
2888,
4592,
1082,
3664,
3666,
1017,
787,
17198,
17197,
5527,
3726,
5480,
3665,
3728,
3729,
21217,
8364,
4594,
17222,
6890,
12210,
18045,
10841,
},
["level"] = 299,
["specialization"] = false,
["rank"] = "Artisan",
},
[164] = {
["skills"] = {
12259,
3490,
5540,
3848,
7166,
7942,
7941,
2849,
3489,
2845,
7945,
5541,
3491,
2848,
2844,
7944,
3850,
3849,
2850,
2847,
3856,
3855,
7958,
3488,
3851,
7956,
6214,
3854,
3853,
7957,
3487,
7955,
12415,
12624,
7931,
7920,
7963,
9366,
3845,
3837,
6040,
3846,
3844,
3841,
3843,
3836,
3835,
3485,
3842,
3484,
2870,
3483,
3482,
2869,
3481,
2868,
6731,
2866,
2865,
3480,
2864,
6350,
2857,
2854,
3474,
3473,
3472,
2851,
3471,
3469,
2852,
2853,
10421,
12408,
12405,
7936,
7937,
7939,
7935,
7933,
7934,
7930,
7928,
7938,
7927,
7926,
7922,
7921,
7919,
7918,
7071,
7969,
7967,
15871,
11144,
7966,
7964,
7965,
6042,
15870,
11128,
3486,
2871,
3241,
15869,
6338,
3478,
3470,
2863,
3240,
2862,
3239,
},
["level"] = 270,
["specialization"] = 9788,
["rank"] = "Artisan",
},
[129] = {
["skills"] = {
1251,
2581,
6452,
3530,
3531,
6450,
6451,
8544,
8545,
},
["level"] = 252,
["specialization"] = false,
["rank"] = "Artisan",
},
},
},
}
RecipeMasterMainFramePreferences = {
["mainFrameHeight"] = 413,
["sortRecipesBy"] = "Skill",
["mainFrameOffsets"] = {
152.1778106689453,
-62.57773208618164,
},
["sortAscending"] = true,
}
RecipeMasterOptionsFramePreferences = {
["showLearnedRecipes"] = false,
["restoreButtonIconTexture"] = "Interface/Icons/INV_Scroll_04",
["showRecipesInfo"] = true,
["iconSpacing"] = 5,
["progressColor"] = {
0,
0.44,
0.87,
},
["backgroundOpacity"] = 1,
["progressTexture"] = "Interface/TARGETINGFRAME/BarFill2",
}
commented

I also have the addon Unlearned Recipes: https://www.curseforge.com/wow/addons/unlearned-recipes

commented

I don't know if this is related, but recipes I have learned are showing up as "Learnable".

commented

Ah ha, PROGRESS! I deleted my saved variables for Recipe Master, and it is fixed! As for the "Learnable" thing, close and open the profession UI and RM updates.

I toggled off "show learned recipes" and the addon still works. Therefore, it is something about the SV file that was corrupt.

commented

You cannot replicate the error because you are doing a fresh installation of Recipe Master. Those who upgraded from an older version than 2.0.0 will get the error. I don't know where in the code it gets triggered, so I'll post my fresh saved variables file and you can compare.

RecipeMasterProfessionsAndSkills = {
["Mankrik"] = {
["Vortgar"] = {
},
["Sygon"] = {
[186] = {
["level"] = 221,
["skills"] = {
3577,
3860,
3859,
3575,
2842,
2841,
3576,
2840,
},
["specialization"] = false,
["rank"] = "Artisan",
},
[356] = {
["level"] = 185,
["skills"] = {
},
["specialization"] = false,
["rank"] = "Expert",
},
[164] = {
["level"] = 270,
["skills"] = {
12259,
3490,
5540,
3848,
7166,
7942,
7941,
2849,
3489,
2845,
7945,
5541,
3491,
2848,
2844,
7944,
3850,
3849,
2850,
2847,
3856,
3855,
7958,
3488,
3851,
7956,
6214,
3854,
3853,
7957,
3487,
7955,
12415,
12624,
7931,
7920,
7963,
9366,
3845,
3837,
6040,
3846,
3844,
3841,
3843,
3836,
3835,
3485,
3842,
3484,
2870,
3483,
3482,
2869,
3481,
2868,
6731,
2866,
2865,
3480,
2864,
6350,
2857,
2854,
3474,
3473,
3472,
2851,
3471,
3469,
2852,
2853,
10421,
12408,
12405,
7936,
7937,
7939,
7935,
7933,
7934,
7930,
7928,
7938,
7927,
7926,
7922,
7921,
7919,
7918,
7071,
7969,
7967,
15871,
11144,
7966,
7964,
7965,
6042,
15870,
11128,
3486,
2871,
3241,
15869,
6338,
3478,
3470,
2863,
3240,
2862,
3239,
},
["specialization"] = 9788,
["rank"] = "Artisan",
},
[129] = {
["level"] = 252,
["skills"] = {
1251,
2581,
6452,
3530,
3531,
6450,
6451,
8544,
8545,
},
["specialization"] = false,
["rank"] = "Artisan",
},
[185] = {
["level"] = 299,
["skills"] = {
2679,
2681,
6888,
6290,
2680,
5525,
2684,
724,
733,
2683,
2687,
3663,
4593,
5095,
21072,
2685,
3220,
2682,
3662,
2888,
4592,
1082,
3664,
3666,
1017,
787,
17198,
17197,
5527,
3726,
5480,
3665,
3728,
3729,
21217,
8364,
4594,
17222,
6890,
12210,
18045,
10841,
},
["specialization"] = false,
["rank"] = "Artisan",
},
},
},
}
RecipeMasterMainFramePreferences = {
["mainFrameHeight"] = 413,
["sortAscending"] = true,
["mainFrameOffsets"] = {
272.0000305175781,
-61.86666488647461,
},
["sortRecipesBy"] = "Skill",
}
RecipeMasterOptionsFramePreferences = {
["showLearnedRecipes"] = false,
["progressTexture"] = "Interface/TARGETINGFRAME/BarFill2",
["showRecipesInfo"] = true,
["iconSpacing"] = 5,
["backgroundOpacity"] = 1,
["progressColor"] = {
0,
0.44,
0.87,
},
["restoreButtonIconTexture"] = "Interface/Icons/INV_Scroll_04",
}
commented

Darn it, I spoke too soon. The error came back.

commented

Sorry for not responding sooner, @Myrroddin, I was away for the day.
I'll take into consideration all the useful information you provided and will work on a reliable fix for the next 24 hours.

commented

Because of formatting, I am posting the new BugSack report here. This is with the tester version of Recipe Master.

2x ...peMaster/Source/Display/RecipesDisplay.lua:87: bad argument #1 to 'GetItemQualityColor' (Usage: local r, g, b, qualityString = C_Item.GetItemQualityColor(quality))
[string "=[C]"]: in function `GetItemQualityColor'
[string "@RecipeMaster/Source/Display/RecipesDisplay.lua"]:87: in function <...peMaster/Source/Display/RecipesDisplay.lua:83>
[string "@RecipeMaster/Source/Display/RecipesDisplay.lua"]:95: in function <...peMaster/Source/Display/RecipesDisplay.lua:92>
[string "@RecipeMaster/Source/Display/RecipesDisplay.lua"]:102: in function <...peMaster/Source/Display/RecipesDisplay.lua:99>
[string "@RecipeMaster/Source/Display/RecipesDisplay.lua"]:110: in function `showProfessionRecipes'
[string "@RecipeMaster/Source/Management/RecipesFrameManager.lua"]:74: in function `updateRecipeDisplay'
[string "@RecipeMaster/Source/Management/RecipesFrameManager.lua"]:84: in function `showRecipesFrame'
[string "@RecipeMaster/Source/Handlers/EventHandler.lua"]:45: in function <RecipeMaster/Source/Handlers/EventHandler.lua:44>
[string "@RecipeMaster/Source/Handlers/EventHandler.lua"]:58: in function <RecipeMaster/Source/Handlers/EventHandler.lua:57>

Locals:
(*temporary) = nil
commented

The issue has been fixed in commit d1d2aaf.
All recipe information is now retrieved from a list of properly cached data and not queried from the server when needed.
The fix has been implemented into version Vanilla 2.1.1, which is available for download.
Thank your for your feedback and assistance, @Myrroddin!