This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Filtering for (yellow) recipe difficulty after learning new recipes caused the error below.
GnomeWorks:GetRecipeDifficulty(entry.recipeID) is returning nil for some recipes, and there is no nil check at that point in the code.
Looks to be due to the display of recipes you will be able to learn in future - usually displayed in Red, with the level at which the recipe can be learned, but only after visiting a trainer.The locals show that the error triggered off "Lightweave Embroidery" (125481), which that Alt (skill 245) cannot learn yet.
Date: 2012-11-30 16:58:30ID: 1Error occured in: GlobalCount: 1Message: ..\AddOns\GnomeWorks\MainWindow.lua line 566: attempt to compare number with nilDebug: GnomeWorks\MainWindow.lua:566: func() GnomeWorks\MainWindow.lua:1425: IsEntryFiltered() GnomeWorks\ScrollFrame.lua:357: GnomeWorks\ScrollFrame.lua:342 GnomeWorks\ScrollFrame.lua:352: SortData() GnomeWorks\ScrollFrame.lua:469: RefreshRows() GnomeWorks\ScrollFrame.lua:1368: Refresh() GnomeWorks\MainWindow.lua:307: func() GnomeWorks\MainWindow.lua:501: func() ..\FrameXML\UIDropDownMenu.lua:710: UIDropDownMenuButton_OnClick() [string "*:OnClick"]:1: [string "*:OnClick"]:1Locals:entry = <table> { inventory = <table> { } bag = 0 index = -125481 parent = <table> { } totalCraftable = 333333 totalInventory = 0 arlFlags = <table> { } iconList = <table> { } guildBank = 333333 vendor = 333333 alt = 333333 dataIndex = 157 skillUp = 0 sale = 333333 recipeID = 125481 name = "Lightweave Embroidery" itemColor = <table> { } mail = 333333 depth = 1 bank = 333333}difficulty = nil(*temporary) = <table> { RecipeGroupPruneList = <function> defined @Interface\AddOns\GnomeWorks\RecipeGroups.lua:664 GetSkillLevels = <function> defined @Interface\AddOns\GnomeWorks\RecipeData.lua:252 InitGroupList = <function> defined @Interface\AddOns\GnomeWorks\RecipeGroups.lua:678 AddPseudoTrade = <function> defined @Interface\AddOns\GnomeWorks\GetTradeSkill.lua:50 CancelTimer = <function> defined @Interface\AddOns\AckisRecipeList\libs\AceTimer-3.0\AceTimer-3.0.lua:311 ScanPseudoTrade = <function> defined @Interface\AddOns\GnomeWorks\GetTradeSkill.lua:94 RecipeGroupAddSubGroup = <function> defined @Interface\AddOns\GnomeWorks\RecipeGroups.lua:272 InventoryScan = <function> defined @Interface\AddOns\GnomeWorks\Inventory.lua:760 SetInventoryCount = <function> defined @Interface\AddOns\GnomeWorks\Inventory.lua:519 TRADE_SKILL_UPDATE = <function> defined @Interface\AddOns\GnomeWorks\MainWindow.lua:1730 RecipeGroupConstructDBString = <function> defined @Interface\AddOns\GnomeWorks\RecipeGroups.lua:625 atTrainer = true MessageDispatchTimeReportToggle = <function> defined @Interface\AddOns\GnomeWorks\MessageDispatch.lua:367 InventoryProcess = <function> defined @Interface\AddOns\GnomeWorks\Inventory.lua:708 GetTradeLink = <function> defined @Interface\AddOns\GnomeWorks\SkillList.lua:1413 GetTradeIcon = <function> defined @Interface\AddOns\GnomeWorks\GetTradeSkill.lua:101 isProcessing = false AUCTION_HOUSE_SHOW = <function> defined @Interface\AddOns\GnomeWorks\FrameHooks\AuctionHouse.lua:1087 QueueWindow = GnomeWorksQueueFrame { } RecipeGroupPasteEntry = <function> defined @Interface\AddOns\GnomeWorks\RecipeGroups.lua:312 RegisterMessageDispatch = <function> defined @Interface\AddOns\GnomeWorks\MessageDispatch.lua:23 atVendor = true selectedSkill = 2 ScheduleTimer = <function> defined @Interface\AddOns\AckisRecipeList\libs\AceTimer-3.0\AceTimer-3.0.lua:276 ShowReagents = <function> defined @Interface\AddOns\GnomeWorks\Details.lua:687 SelectEntry = <function> defined @Interface\AddOns\GnomeWorks\SkillList.lua:527 groupLabels = <table> { } GetSkillDifficulty = <function> defined @Interface\AddOns\GnomeWorks\SkillList.lua:1400 ExecuteAddToQueue = <function> defined @Interface\AddOns\GnomeWorks\Queue.lua:1045 RegisterMessage = <function> defined @Interface\AddOns\LibDataBroker\CallbackHandler\CallbackHandler-1.0.lua:118 UnregisterMessage = <function> defined @Interface\AddOns\LibDataBroker\CallbackHandler\CallbackHandler-1.0.lua:181 data = <table> { } RecipeGroupSort = <function> defined @Interface\AddOns\GnomeWorks\RecipeGroups.lua:476 SetFilterText = <function> defined @Interface\AddOns\GnomeWorks\MainWindow.lua:1748 queueFrame = <table> { } AddTrainableSkills = <function> defined @Interface\AddOns\GnomeWorks\SkillList.lua:673 ExpandAllHeaders = <function> defined @Interface\AddOns\GnomeWorks\ScrollFrame.lua:917 TrainerScan = <function> defined @Interface\AddOns\GnomeWorks\FrameHooks\Trainer.lua:9 player = "Patchoki" MAIL_SHOW = <function> defined @Interface\AddOns\GnomeWorks\FrameHooks\Mail.lua:46 RecipeGroupOpRename = <function> defined @Interface\AddOns\GnomeWorks\RecipeGroups.lua:1044 CraftabilityPurge = <function> defined @Interface\AddOns\GnomeWorks\Inventory.lua:228 warning = <function> defined @Interface\AddOns\GnomeWorks\GnomeWorks.lua:583 SpellCastStart = <function> defined @Interface\AddOns\GnomeWorks\Queue.lua:1425 DoTradeSkillUpdate = <function> defined @Interface\AddOns\GnomeWorks\MainWindow.lua:1603 ParseSkillList = <function> defined @Interface\AddOns\GnomeWorks\SkillList.lua:223 selectedEntry = <table> { } PLAYER_GUILD_UPDATE = <function> definAddOns: nLog, v5.1.DEV.292 Swatter, v5.1.DEV.338 AckisRecipeList, v2.4.2 ACP, v3.4.1 Altoholic, v5.1.001 Archy, v1.8.38a AutoBar, vv5.1.0.0 Babylonian, v5.1.DEV.332 BadBoy, v11.234 Bagnon, v5.1.0 BeanCounter, v5.1.DEV.5377 ChatClear, v1.11 Chatter, v1.0 Configator, v5.1.DEV.344 Cromulent, v50100-1 DataStore, v5.1.001 DataStoreAchievements, v5.1.001 DataStoreAgenda, v5.1.001 DataStoreAuctions, v5.1.001 DataStoreCharacters, v5.1.001 DataStoreContainers, v5.1.001 DataStoreCrafts, v5.1.001 DataStoreCurrencies, v5.1.001 DataStoreInventory, v5.1.001 DataStoreMails, v5.1.001 DataStorePets, v5.1.001 DataStoreQuests, v5.1.001 DataStoreReputations, v5.1.001 DataStoreSpells, v5.1.001 DataStoreStats, v5.1.001 DataStoreTalents, v5.1.001 DBMCore, v DebugLib, v5.1.DEV.337 DefaultAnchor, v1.21 Dominos, v5.1.0 DominosCast, v DominosRoll, v DominosXP, v EnergyWatch, v5.1.0 eXtremeUnitButtons, v2.1beta1 FishingBuddy, v1.2d FlightMap, v5.0.3 Gatherer, v<%version%> GFWFeedOMatic, v5.0.2 GnomeWorks, v206 HandyNotes, v1.2.0 HandyNotesGuild, v1.6 HandyNotesPetTamers, v1 IceHUD, v1.8.13 (Revision: 927) Informant, v5.1.DEV.5347 InlineAura, vv1.8.10 InlineAuraDefaults, vv1.8.10 LibDataBroker, v LibExtraTip, v5.12.DEV.342 LinkWrangler, v1.88 LinkWranglerAuctioneer, v1.55 LinkWranglerCompanion, v1.68 Livestock, v1.8.0 Mapster, v1.5.1 MinimapButtonFrame, v3.1.9 MinimapButtonFrameSkinPack, v3.0.1 Notes, v1.3.18 OmniCC, v5.0.3 Outfitter, v5.7 Pawn, v1.7.3 PetBattleTeams, v2.4.13 PitBull4, vv4.0.0-beta41 PitBull4Aggro, vv4.0.0-beta41 PitBull4AltPowerBar, vv4.0.0-beta41 PitBull4Aura, vv4.0.0-beta41 PitBull4Background, vv4.0.0-beta41 PitBull4BattlePet, vv4.0.0-beta41 PitBull4Border, vv4.0.0-beta41 PitBull4CastBar, vv4.0.0-beta41 PitBull4CastBarLatency, vv4.0.0-beta41 PitBull4Chi, vv4.0.0-beta41 PitBull4CombatFader, vv4.0.0-beta41 PitBull4CombatIcon, vv4.0.0-beta41 PitBull4CombatText, vv4.0.0-beta41 PitBull4ComboPoints, vv4.0.0-beta41 PitBull4DruidManaBar, vv4.0.0-beta41 PitBull4HealthBar, vv4.0.0-beta41 PitBull4HideBlizzard, vv4.0.0-beta41 PitBull4Highlight, vv4.0.0-beta41 PitBull4HostilityFader, vv4.0.0-beta41 PitBull4LeaderIcon, vv4.0.0-beta41 PitBull4LuaTexts, vv4.0.0-beta41 PitBull4MasterLooterIcon, vv4.0.0-beta41 PitBull4PhaseIcon, vv4.0.0-beta41 PitBull4Portrait, vv4.0.0-beta41 PitBull4PowerBar, vv4.0.0-beta41 PitBull4PvPIcon, vv4.0.0-beta41 PitBull4QuestIcon, vv4.0.0-beta41 PitBull4RaidTargetIcon, vv4.0.0-beta41 PitBull4RangeFader, vv4.0.0-beta41 PitBull4ReadyCheckIcon, vv4.0.0-beta41 PitBull4RestIcon, vv4.0.0-beta41 PitBull4RoleIcon, vv4.0.0-beta41 PitBull4Sounds, vv4.0.0-beta41 PitBull4ThreatBar, vv4.0.0-beta41 PitBull4VoiceIcon, vv4.0.0-beta41 PopPlus, v1.23 Postal, v3.5.0 PowerAuras, v5.0.0.P QuestGuru, v2.2.13-50001 QuestGuruTracker, v1.5.14-50001 Recount, v SlideBar, v5.1.DEV.312 Stubby, v5.1.DEV.275 TidyPlates, v6.8.0 (R556) TidyPlatesNeon, v TidyPlatesHub, v TidyPlatesWidgets, v TipHelper, v5.12.DEV.343 Titan, v5.1.9.50001 TitanBag, v5.1.9.50001 TitanClock, v5.1.9.50001 TitanGold, v5.1.9.50001 TitanItemDed, v5.1.0.0 TitanLocation, v5.1.9.50001 TitanLootType, v5.1.9.50001 TitanPerformance, v5.1.9.50001 TitanRepair, v5.1.9.50001 TitanXP, v5.1.9.50001 TooltipItemIcon, v1.62 TradeSkillInfo, vv2.2.6 ZoomOut, v1.0 BlizRuntimeLib_enUS v5.1.0.50100 <eu> (ck=dcf)
Looks like I fixed this when fixing skillups
Still getting the same error, though at a different line number now.
Hmm.. looks like the scan database is probably returning 0 again. Changing GetRecipeDifficulty to always return a value. Will put on my list of things to do - find out why scan database is returning 0 as a difficulty level again :)
edit: It's also possible that I don't see this error because I have an experimental re-write of the trainer scanning in my local copy.
After some experimenting, if only occurs on my low level Tailor and Leatherworker, but not on Blacksmithing, and only after visiting a trainer.
Pretty sure it's something to do with those profession perk Leg, Cloak and Bracer enchants.
Have the skilllevels been scanned for this toon, or are the fallback levels being used?
Strange, my trainable spells for my tailor aren't even showing up. Will have to look at this next time I get a chance to (I'll have to revert to the public version and see if it works and if I can break it, then apply my new code and see what else breaks) :)
so if i understand, you are going to a leatherworking or tailor trainer and getting the list of recipes you don't have, and then it's bombing when filter by difficulty?
the level scanning code should give levels for ALL trade skills, regardless of whether you've learned them. try opening the tailor skill for "all recipes" and see if it's got unpopulated skill levels for any of the skills your tailor could learn from a trainer. those would show up as 1/1/1/1 if they have no data.
looking at the code, i'm thinking the problem is in the GnomeWorks:GetRecipeDifficulty() function. if there's no scanned data (for some reason, but that's another issue) it falls back to looking at the difficulty data from the scanned known recipes for the current player. since trainable skills can't be scanned for the current player, the difficulty is not defined.
modifying it to return "unknown" for such skills should work, but i'm not sure why it's not scanning these skills. it's possible that they're scanned properly in the level scan code, but somehow being corrupted by the trainer scanning code.
if you get this error again, check for the spell id of the offending recipe and open your sv file to see if you can find the recipeSkillLevels[] entries for that id. [2] is the level at which it goes yellow, [3] is the level at which it goes gray. (green is halfway between yellow and gray) [1] would be the level it's learnable, if it's been scanned (not sure i keep that data in the sv file, so it's likely empty)
Reverted to r229. Before scanning levels - Trainable spells not showing. After scanning levels - Trainable spells not showing.
r229 does make the error go away. But as to figuring out the underlying cause, I dug out an error log from r228 to see which recipe triggered it this time: "Swordguard Embroidery" (75178) - this is actually the spellID for Rank 2
That alt is only skill level 385.
Swordguard Embroidery(Rank 1)(55777) is learned at 420.
At 500 you automatically learn Rank 2, and Rank 1 gets deleted.
At 550 you learn Rank 3 (125483), and Rank 2 gets deleted.
Looking into recipeSkillLevels for those 3 spellIDs, I found:
Rank 1(55777) has /1/1 (i.e. 'learnable' level is missing)
Rank 2(75178) has 420/1/1
Rank 3(125483) also has 420/1/1
I also had a closer look at my 'trainable' recipes after visiting a trainer. Most of the recipes were Red, correctly showing I couldn't learn them yet. However the 3 Embroideries and 2 Spellthreads were Gray.
i hate when they make mechanics like that... why not 3 different spells with different names that you learn like normal? why come up with some new unique weird case like this...
the gray vs red thing might just be a case of needing to check the lower bounds before the upper bounds. the 420/1/1 is actually legit in that it is a gray recipe when you learn it. technically speaking, it's gray according to the server at level 1. i think the first check for coloration is whether it's turned gray (above the gray threshold) but it could be reworked to check the learn-at level first to catch these cases.
not sure why it doesn't catch the first rank and add the learn-at value. could be that it only grabs the first one it comes across and you happen to have visited the trainer twice...?
To post a comment, please login or register a new account.