seirl / AdiBags_TSM

A filter for AdiBags that allows you to sort your items according to your TSM groups.
GNU General Public License v3.0
2 stars 3 forks source link

Invalid item strings passed to Groups.GetPathByItem() #3

Closed rtim75 closed 6 years ago

rtim75 commented 6 years ago

It started to spam errors when I open my bags. The text of error:

Error in AdiBags: ...AddOns\TradeSkillMaster\Core\Service\Groups\Core.lua:300: assertion failed! -- details: [Error 00000210E266FE70] Error in AdiBags: ...AddOns\TradeSkillMaster\Core\Service\Groups\Core.lua:300: assertion failed! -- details: [Error 00000210E266FE70]

...AddOns\TradeSkillMaster\Core\Service\Groups\Core.lua:300: assertion failed! (tail call): ? Interface\AddOns\AdiBags\core\Filters-Фильтры.lua:146: in function Filter' Interface\AddOns\AdiBags\widgets\ContainerFrame.lua:717: in functionFilterSlot' Interface\AddOns\AdiBags\widgets\ContainerFrame.lua:751: in function DispatchItem' Interface\AddOns\AdiBags\widgets\ContainerFrame.lua:912: in functionRedispatchAllItems' Interface\AddOns\AdiBags\widgets\ContainerFrame.lua:1055: in function `FullUpdate' Interface\AddOns\AdiBags\widgets\ContainerFrame.lua:564: in function <Interface\AddOns\AdiBags\widgets\ContainerFrame.lua:550>

Interface\AddOns\AdiBags\core\Utility.lua:89: in function <Interface\AddOns\AdiBags\core\Utility.lua:81> Interface\AddOns\AdiBags\widgets\LayeredRegion.lua:119: in function <Interface\AddOns\AdiBags\widgets\LayeredRegion.lua:108>

seirl commented 6 years ago

I can't seem to reproduce that with my inventory. Does the issue still happen when adding this line:

if (slotData == nil or slotData.link == nil) then return end

just before this line:

tsmpath = TSM_API.GetGroupPathByItem(slotData.link)

in Interface/AddOns/AdiBags_TSM.lua?

jenniferbhampton commented 6 years ago

I added that line and still had the error, also tried disabling all other Adibag's filters, disabling the TSM App Helper, and disabling all other addons.

seirl commented 6 years ago

Yeah, clearly it's a problem caused by a specific item, but I'm not sure where that problem happens, which is why it's hard to debug. I'm going to try to dig in the TSM code to see if it was tied to a recent change they did.

@Sapu94 sorry for summoning you, but are you aware of any changes made in the GetGroupPathByItem() function? It seems that the assert condition is met even for some non-null item links. Is there a way to gracefully handle those problems?

seirl commented 6 years ago

Hehehe, got the error too! I was a bit late in doing my M+ keys, but now I finally got a keystone and that's what triggers this bug.

To fix that I'm passing the item link I get from AdiBags to ToItemString() then GetItemLink() to get a link back, and it seems to work. I'm committing that and tagging a new release.