ItemRack icon indicating copy to clipboard operation
ItemRack copied to clipboard

Opening Bank causes error SOD (P5)

Open Believe82 opened this issue 1 year ago • 4 comments

Message: Interface/AddOns/ItemRack/ItemRack.lua:43: bad argument #1 to 'IsInventorySlotEngravable' (outside of expected range 0 to 4294967295 - Usage: local result = C_Engraving.IsInventorySlotEngravable(containerIndex, slotIndex)) Time: Thu Oct 10 11:35:04 2024 Count: 5 Stack: Interface/AddOns/ItemRack/ItemRack.lua:43: bad argument #1 to 'IsInventorySlotEngravable' (outside of expected range 0 to 4294967295 - Usage: local result = C_Engraving.IsInventorySlotEngravable(containerIndex, slotIndex)) [string "@Interface/AddOns/ItemRack/ItemRack.lua"]:43: in function AppendRuneID' [string "@Interface/AddOns/ItemRack/ItemRack.lua"]:709: in function GetID' [string "@Interface/AddOns/ItemRack/ItemRack.lua"]:1143: in function BuildMenu' [string "@Interface/AddOns/ItemRack/ItemRack.lua"]:1874: in function DockMenuToCharacterSheet' [string "@Interface/AddOns/ItemRack/ItemRack.lua"]:1853: in function `PaperDollItemSlotButton_OnEnter' [string "*PaperDollFrame.xml:33_OnEnter"]:1: in function <[string "*PaperDollFrame.xml:33_OnEnter"]:1>

Locals: bag = -1 slot = 1

Believe82 avatar Oct 10 '24 10:10 Believe82

Duplicate of #251 - some solutions posted there.

Anonomit avatar Oct 16 '24 01:10 Anonomit

Duplicate of #251 - some solutions posted there.

Not a duplicate, different error and #251 should have been fixed in 4.2. This issue still happens in 4.23

gurka avatar Nov 29 '24 16:11 gurka

Modifying this line: https://github.com/Rottenbeer/ItemRack/blob/a36c7fc17a5cf1e2ae2a52d9c8ce2c186126f68e/ItemRack/ItemRack.lua#L43

to if bag >= 0 and C_Engraving.IsInventorySlotEngravable(bag, slot) then

seems to fix it. However I only tested it very quickly, but moving gear from and to the bank via ItemRack's "extension" to the Character Info frame works OK.

I can make a PR later today.

Edit: might be interesting to figure out why we get bag=-1 in the first place. I have no idea what the value represents Edit2: I guess this is related: https://wowwiki-archive.fandom.com/wiki/BagId

gurka avatar Nov 29 '24 16:11 gurka

This is still happening, is this fix something we can merge into master?

tstirrat avatar Jan 11 '25 00:01 tstirrat