Files 1
Downloads 63,786
Favorites 119
My AddOns
View Bug Report
crash in inventory
Bug #: 2044
File: Nirn Auction House
Date: 08/10/17 07:34 PM
By: remedy
Status: Fixed
I get the following error.

user:/AddOns/NirnAuctionHouse/NirnAuctionHouse.lua:3519: attempt to index a nil value
stack traceback:
user:/AddOns/NirnAuctionHouse/NirnAuctionHouse.lua:3519: in function 'NirnAuctionHouse:SetItemBadges'
user:/AddOns/NirnAuctionHouse/NirnAuctionHouse.lua:3475: in function 'hookFunction'
EsoUI/Libraries/Utility/ZO_Hook.lua:19: in function 'hookedFunctions'
user:/AddOns/ResearchAssistant/ResearchAssistant.lua:291: in function 'puffer'
user:/AddOns/CraftStoreFixedAndImproved/CraftStore.lua:656: in function 'setupCallback'
EsoUI/Libraries/ZO_Templates/ScrollTemplates.lua:1533: in function 'ZO_ScrollList_UpdateScroll'
EsoUI/Libraries/ZO_Templates/ScrollTemplates.lua:1293: in function 'ZO_ScrollList_Commit'
EsoUI/Ingame/Inventory/Inventory.lua:707: in function 'ZO_InventoryManager:ApplySort'
EsoUI/Ingame/Inventory/Inventory.lua:1086: in function 'ZO_InventoryManager:UpdateList'
EsoUI/Ingame/Inventory/Inventory.lua:773: in function 'ZO_InventoryManager:ChangeFilter'
EsoUI/Ingame/Inventory/Inventory.lua:62: in function 'HandleTabSwitch'
EsoUI/Libraries/ZO_MenuBar/ZO_MenuBar.lua:280: in function 'MenuBarButton:Release'
EsoUI/Libraries/ZO_MenuBar/ZO_MenuBar.lua:628: in function 'ZO_MenuBarButtonTemplate_OnMouseUp'
ZO_MainMenuCategoryBarButton1_MouseUp:3: in function '(main chunk)'

The line is:

NAH.AuctionBadges[slot.bagId][slot.slotIndex]=parentControl.ControlBadge

I seem to have fixed it somehow when I added some debugging lines before that line

if parentControl.ControlBadge==nil then
d("parentControl.ControlBadge == nil")
d(AuctionBadgeName)
end
NAH.AuctionBadges[slot.bagId][slot.slotIndex]=parentControl.ControlBadge

Once I put that.. the error doesn't happen :confused::confused:

So I'm guessing there is some lazy evaluation maybe that is forced to be resolved by that conditional?

In any case I can reproduce the error, by removing the dedbug lines but that doesn't really help me understand what is going on. My lua is rusty, hopefully this will make more sense to you.

Oh, it seemed to start to happen when I had a motif listed, then got another one, and stacked them. However i separated the stack in case that was the problem but it persists. So I don't know if that was related or coincidental.