Skillet

Skillet

112k Downloads

Skillet\UI\MainFrame.lua:2608: attempt to index local 'reagent' (a nil value)

Galthariel opened this issue ยท 20 comments

commented

Using Version 4.28

40x Skillet\UI\MainFrame.lua:2608: attempt to index local 'reagent' (a nil value)
[string "@Skillet\UI\MainFrame.lua"]:2608: in function `ReagentButtonOnClick'
[string ":OnClick"]:12: in function <[string ":OnClick"]:1>

Locals:
self =

{
DeleteIgnoreEntry = defined @Skillet\UI\IgnoreList.lua:159
RecipeGroupPruneList = defined @Skillet\RecipeGroups.lua:506
SkillButton_NewGroup = defined @Skillet\UI\MainFrame.lua:2220
guildText = 0
ClearQueue = defined @Skillet\SkilletQueue.lua:223
RecipeGroupInitFlatten = defined @Skillet\RecipeGroups.lua:362
RecipeGroupConstructDBString = defined @Skillet\RecipeGroups.lua:482
SkilletShow = defined @Skillet\Skillet.lua:967
DisplayShoppingList = defined @Skillet\UI\ShoppingList.lua:1129
ShowQueueView = defined @Skillet\UI\MainFrame.lua:3447
ReagentStarsFrame_OnMouseEnter = defined @Skillet\UI\MainFrame.lua:3598
SKILL_LINES_CHANGED = defined @Skillet\Skillet.lua:803
ScheduleTimer = defined @ace3\AceTimer-3.0\AceTimer-3.0.lua:94
FilterDropDown_OnShow = defined @Skillet\UI\Filtering.lua:25
GARRISON_TRADESKILL_NPC_CLOSED = defined @Skillet\Skillet.lua:924
hideTrivialRecipes = false
SetTradeSkillLearned = defined @Skillet\SkilletData.lua:297
guildbankQueryComplete = defined @Skillet\UI\ShoppingList.lua:461
RecipeGroupSort = defined @Skillet\RecipeGroups.lua:340
EnableResize = defined @Skillet\UI\Utils.lua:72
db =
{
}
bankBusy = false
UpdateNotesWindow = defined @Skillet\UI\RecipeNotes.lua:116
SetEnabledState = defined @ace3\AceAddon-3.0\AceAddon-3.0.lua:424
SkilletShowWindow = defined @Skillet\Skillet.lua:1031
AdditionalButtonsList =
{
}
CHAT = defined @Skillet\DebugAids.lua:65
HideOptionalList = defined @Skillet\UI\OptionalList.lua:226
IgnoreList_OnScroll = defined @Skillet\UI\IgnoreList.lua:262
SortDropdown_OnLoad = defined @Skillet\UI\Sorting.lua:488
pluginsOptions =
{
}
UnregisterAllEvents = defined @ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:174
RecipeGroupFlatten = defined @Skillet\RecipeGroups.lua:378
FinishChange = defined @Skillet\Skillet.lua:1218
FavoriteButton_OnClick = defined @Skillet\UI\MainFrame.lua:2299
SkilletShowGuildCrafters = defined @Skillet\UI\MainFrame.lua:3167
ITEM_DATA_LOAD_RESULT = defined @Skillet\Skillet.lua:928
ShowReagentDetails = defined @Skillet\UI\MainFrame.lua:3149
bopCheck = defined @Skillet\UI\MainFrame.lua:1607
CHAT_MSG_SKILL = defined @Skillet\Skillet.lua:795
SkillExpandButton_OnClick = defined @Skillet\UI\MainFrame.lua:2397
TABLE = defined @Skillet\DebugAids.lua:313
FixBugs = true
Unhook = defined @ace3\AceHook-3.0\AceHook-3.0.lua:418
InventoryFilterButton_OnShow = defined @Skillet\UI\MainFrame.lua:2738
SetTradeSkillToolTip = defined @Skillet\UI\MainFrame.lua:1515
LEARNED_SPELL_IN_TAB = defined @Skillet\Skillet.lua:812
ToggleTradeSkillOption = defined @Skillet\Skillet.lua:1515
L =
{
}
button_count = 27
RemoveFromQueue = defined @Skillet\SkilletQueue.lua:207
UNIT_SPELLCAST_INTERRUPTED = defined @Skillet\SkilletQueue.lua:549
emptyCategoriesToAdd =
{
}
TradeSkillAutoTarget =
{
}
Tr

commented

Based on the lua error report, it appears that the Skillet frame was open, the recipe Heavy Desolate Leather was clicked on the recipe (left) side, and the reagent Desolate Leather was clicked (40 times) on the detail (right) side. That scenario doesn't make sense. This is a very simple recipe with one reagent, Desolate Leather x 10. The Skillet database you attached doesn't show anything out of the ordinary with regards to this recipe.

I need Skillet debugging output after you make a change to the source code. In `...\Skillet\UI\MainFrame.lua please remove the "--" from the beginning of line 2594. Type "/skillet debugshow on" and attempt to recreate the error (only need to make one). If you do recreate it (I wouldn't be surprised if you can't), then I will need the per character saved variables file Skillet.lua from Galthariel.

The only other thing I can do is to add some paranoia to the code to prevent this lua error from happening.

commented

Here's a copy of MainFrame.lua with some paranoia checks and debugs added:

MainFrame.zip

commented

can you please tell me what steps you want me to do?

1 - Should I try to create more Heavy Desolate Leather before use your MainFrame.lua file?
2 - I'm guessing I only need to replace the current MainFrame.lua by the one you post it the previous msg correct? Probably saving the original one first
3 - Send you the new error (if happens) and the updated Skillet.lua?

Thanks,

commented

Just made 5x Heavy Desolate Leather without using your MainFrame.lua and error did not happened. Should I let it go and keep an eye on it?

commented

I hate intermittent errors! My modified MainFrame.lua doesn't change the logic but will prevent the lua error from happening again. It will instead capture additional information if debugging is enabled. As I think about it, that won't help us much as you won't know if it happens again so I probably should implement it differently with a warning message you can see.

MainFrame.zip

Install this one (no need to save the old one) and type "/skillet debuglogging on", "/skillet tabledump on", "/skillet warnshow". This will write the debug output to your character specific saved variables file, Skillet.lua. The output is limited so only the most recent data will be captured. There is minimal overhead (I run this way all the time). If this error occurs again, there will be a warning message sent to chat instead of a lua error.

"/skillet debugstatus" will show you the current settings and "/skillet debugoff" will turn debugging off completely.

commented

There is not enough information here to determine the cause of this error. Since the error occurs as a result of a click, I need at least a screenshot before the fatal click. What profession, what recipe, what reagent? I will also need the global saved variables file Skillet.lua and the character name (if a screenshot is not provided). Since this has occurred 40 times, any other context would be useful.

There's a good chance that this still won't be enough and we will need to enable Skillet's debugging (perhaps with a special build).

commented

Profession is Leatherworking and now that you mentioned it happened 40 times my guess is that the issue happened when I made the Heavy Desolate Leather because was the only recipe I used yesterday and I made 40 of it. Character name is Galthariel-Uther and here is the lua file. Skillet.zip

commented

Perfect. Will do that and keep you posted :-)

commented

Ok..this happened just after I was trying to change the amount of Desolate Leather I want to make (not clicking the arrows which works just fine). The number stays 1 and doesn't let me change .
Skillet.lua_Plus_Screenshot.zip

commented

You were changing the amount while you were crafting? Can you give me the entire sequence of steps? I need to get a reproducible case so I can test any changes I make.

I think I know what's going on. Skillet allocates a fixed number of slots for reagents (including optional reagents) and I just changed that number from 8 to 12 because some engineering recipes with optional reagents have more than 8 reagents. While the empty buttons are hidden, they are "behind" the controls and as such are being "clicked" while you are using the controls.

Now that I check for valid inputs, it should be no harm, no foul. Does anything unexpected happen other than the warning message? If so, stretch the Skillet frame taller and this should go away.

What I should do is make the detail section of the frame scrollable because I'm running into more and more cases where there is more information displayed that it can hold.

commented

Just tested the new version and while I don't get any errors neither in chat or BugSack I can't type the quantity of an item I want to make (cursor is there and it seems I can click and type however it doesn't work) and I can only use the arrow (+1 or +10) to set the quantity. If is intended I'm good and I can start using the arrows from now on. Just want to let you know :-)

2021-05-26_20-58-33

commented

NVM, Skillet-4.29-alpha1 fixes this problem by hiding and disabling the unused buttons.

commented

I know you said NVM however here is the step by step. Wasn't trying to change the amount while crafting or even clicking in any of the arrows (+1 or +10) when the error happened. Before I click the "Create" button I use to type the amount I want in the little box instead of using the arrows. I was trying to click that little box when the error happened and I was not able to use the little box and had to use the +1 and +10 arrows

commented

The change I made should fix the buttons from being hijacked by unused reagent buttons. Stretching the Skillet frame would also fix it. Let me know if it doesn't.

commented

It works for me but the size of the text box is much larger than the size of the area sensitive to clicks to gain focus. The same thing is happening to the button next to the text box which will set the count back to one when clicked. You can see that there's an alignment issue with the clear button because it lights up when (it thinks) the mouse is over the button.

I'll look into why these controls are behaving this way when the buttons to increase/decrease the count seem to be sensitive over their entire visible area.

commented

Just tested Skillet-Classic and this text area and the clear button behave "normally". You can click anywhere within the visible area or mouseover the entire button.

commented

This inability to click in the text box appears to be a side effect of the additional reagent buttons. If you increase the vertical size of the frame, the text box and the clear button start to behave normally. I need to understand why the "Queue All", "Queue", "Create All" and "Create" buttons aren't affected.

commented

Fixed :-)

commented

I even disabled all my addons to make sure that nothing is interfering and nope...typing the amount I want doesn't work. Like I said not a big deal or issue since I can always use the arrow buttons to set the amount I want. Just though you want to know this is happening. Happy to help test anything you want/need :-)

commented

I think I've fixed it in Skillet-4.29-alpha2 available momentarily. Let me know if it works for you.