BetterBags

BetterBags

1M Downloads

FrameXML/ContainerFrame.lua:1431: attempt to compare nil with number

ntowle opened this issue ยท 3 comments

commented

Was listing items on the auction house, when an entire section disappeared and the following error was encountered.
image

1x FrameXML/ContainerFrame.lua:1431: attempt to compare nil with number
[string "@FrameXML/ContainerFrame.lua"]:1431: in function `ContainerFrameItemButton_CalculateItemTooltipAnchors'
[string "@FrameXML/ContainerFrame.lua"]:1517: in function `UpdateTooltip'
[string "@FrameXML/ContainerFrame.lua"]:1723: in function `CheckUpdateTooltip'
[string "@BetterBags/frames/item.lua"]:146: in function `SetItem'
[string "@BetterBags/views/gridview.lua"]:91: in function `GridView'
[string "@BetterBags/frames/bag.lua"]:184: in function `Draw'
[string "@BetterBags/core/init.lua"]:115: in function `cb'
[string "@BetterBags/core/events.lua"]:41: in function <BetterBags/core/events.lua:36>
[string "=[C]"]: ?
[string "@AnnoyingPopupRemover/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ver/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AnnoyingPopupRemover/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@BetterBags/core/events.lua"]:94: in function `SendMessage'
[string "@BetterBags/data/items.lua"]:132: in function <BetterBags/data/items.lua:126>
[string "=[C]"]: in function `xpcall'
[string "@FrameXML/ObjectAPI/ContinuableContainer.lua"]:83: in function <..FrameXML/ObjectAPI/ContinuableContainer.lua:75>
[string "=(tail call)"]: ?
[string "@BetterBags/data/items.lua"]:126: in function `ProcessContainer'
[string "@BetterBags/data/items.lua"]:120: in function `RefreshBackpack'
[string "@BetterBags/data/items.lua"]:64: in function `RefreshAll'
[string "@BetterBags/data/items.lua"]:48: in function `cb'
[string "@BetterBags/core/events.lua"]:81: in function <BetterBags/core/events.lua:76>

Locals:
self = BetterBagsItemButton134 {
 0 = <userdata>
 OnLeave = <function> defined @FrameXML/ContainerFrame.lua:1493
 SetItem = <function> defined @FrameXML/ItemButtonTemplate.lua:544
 OnHide = <function> defined @FrameXML/ContainerFrame.lua:1585
 IconOverlay = Texture {
 }
 SetItemButtonQuality = <function> defined @FrameXML/ItemButtonTemplate.lua:662
 __MSQ_bType = "Item"
 SetAlpha = <function> defined @FrameXML/ItemButtonTemplate.lua:631
 UpdateCooldown = <function> defined @FrameXML/ContainerFrame.lua:1704
 ItemSlotBackground = Texture {
 }
 showMatchHighlight = true
 OnDragStart = <function> defined @FrameXML/ContainerFrame.lua:1591
 OnReceiveDrag = <function> defined @FrameXML/ContainerFrame.lua:1595
 icon = BetterBagsItemButton134IconTexture {
 }
 __MSQ_SetItemButtonTexture = true
 isExtended = false
 PostOnEvent = <function> defined @FrameXML/ItemButtonTemplate.lua:427
 UpdateTooltip = <function> defined @FrameXML/ContainerFrame.lua:1504
 SetReadable = <function> defined @FrameXML/ContainerFrame.lua:1696
 CheckUpdateTooltip = <function> defined @FrameXML/ContainerFrame.lua:1720
 __MSQ_Scale = 1
 UpdateNewItem = <function> defined @FrameXML/ContainerFrame.lua:1642
 IsReadable = <function> defined @FrameXML/ContainerFrame.lua:1700
 __MSQ_NewNormal = Texture {
 }
 count = 12
 UpdateItemContextMatching = <function> defined @FrameXML/ItemButtonTemplate.lua:450
 JunkIcon = Texture {
 }
 SetItemButtonCount = <function> defined @FrameXML/ItemButtonTemplate.lua:614
 SetNormalAtlas = <function> defined =[C]:-1
 SetItemInternal = <function> defined @FrameXML/ItemButtonTemplate.lua:549
 __MSQ_NormalSkin = <table> {
 }
 UpdateCraftedProfessionsQualityShown = <function> defined @FrameXML/ItemButtonTemplate.lua:461
 HighlightTexture = Texture {
 }
 __MSQ_Normal = Texture {
 }
 __MSQ_NormalHook = true
 PostOnShow = <function> defined @FrameXML/ItemButtonTemplate.lua:414
 UpdateItemContextOverlayTextures = <function> defined @FrameXML/ItemButtonTemplate.lua:499
 __MSQ_Enabled = true
 SetItemSource = <function> defined @FrameXML/ItemButtonTemplate.lua:528
 flash = Texture {
 }
 IconQuestTexture = BetterBagsItemButton134IconQuestTexture {
 }
 hasItem = 1
 __MSQ_Skin = <table> {
 }
 SetBagID = <function> defined @FrameXML/ContainerFrame.lua:1599
 IsExtended = <function> defined @FrameXML/ContainerFrame.lua:1734
 __MSQ_Mask = MaskTexture {
 }
 UpdateItemContextOverlay = <function> defined @FrameXML/ItemButtonTemplate.lua:488
 CheckForTutorials = <function> defined @FrameXML/ContainerFrame.lua:1764
 __MSQ_EmptyType = true
 PushedTexture = Texture {
 }
 GetBagID = <function> defined @FrameXML/ContainerFrame.lua:1603
 BattlepayItemTexture = Texture {
 }
 emptyBackgroundAtlas = "bags-item-slot64"
 Count = BetterBagsItemButton134Count {
 }
 GetItemContextOverlayMode = <function> defined @FrameXML/ItemButtonTemplate.lua:471
 SetItemButtonAnchorPoint = <function> defined @FrameXML/ItemButtonTemplate.lua:618
 searchOverlay = BetterBagsItemButton134SearchOverlay {
 }
 __MSQ_Icon = BetterBagsItemButton134IconTexture {
 }
 SetNormalTexture = <function> defined =[C]:-1
 GetItemLocation = <function> defined @FrameXML/ItemButtonTemplate.lua:610
 __Regions = <table> {
 }
 IconOverlay2 = Texture {
 }
 OnModifiedClick = <function> defined @FrameXML/ContainerFrame.lua:1550
 __MSQ_oType = "Button"
 matchesSearch = true
 minDisplayCount = 1
 OnItemContextChanged = <function> defined @FrameXML/ItemButtonTemplate.lua:410
 GetItemContextMatchResult = <function> defined @FrameXML/ContainerFrame.lua:1450
 UpdateExtended = <function> defined @FrameXML/ContainerFrame.lua:1738
 ExtendedSlot = Texture {
 }
 UpdateJunkItem = <function> defined @FrameXML/ContainerFrame.lua:1674
 HasItem = <function> defined @FrameXML/Contai
commented

Okay, I think there's a race in the way this function runs combined with by changing an item frame's position. The base Blizzard function counts on the item not shifting around when removing or adding items to a bag. This is actually related to #59 and will be resolved when I resolve that error as well. I'll work on this tonight or tomorrow.

commented

Weird, this is breaking in UpdateTooltip, a Blizzard function. I'll guard against this so it doesn't get to the Blizzard error.

commented

This has been released, let me know if you run into it again.