frozn / TipTac

WoW AddOn TipTac Reborn
GNU General Public License v3.0
118 stars 25 forks source link

TooltipUtil.SurfaceArgs appears to have vanished #330

Closed WanderingFox closed 3 months ago

WanderingFox commented 3 months ago

Describe the bug

The TooltipUtil.SurfaceArgs approach to scanning tooltips without creating a frame seems to have vanished from 11.0.0 -> 11.0.2

9x TipTacItemRef/libs/LibItemString.lua:321: attempt to call field 'SurfaceArgs' (a nil value)
[string "@TipTacItemRef/libs/LibItemString.lua"]:321: in function <TipTacItemRef/libs/LibItemString.lua:316>
[string "=(tail call)"]: ?
[string "@TipTacItemRef/ttItemRef.lua"]:2417: in function `item'
[string "@TipTacItemRef/ttItemRef.lua"]:1282: in function <TipTacItemRef/ttItemRef.lua:1271>
[string "@TipTac/libs/LibFroznFunctions-1.0-29/LibFroznFunctions-1.0.lua"]:389: in function <...libs/LibFroznFunctions-1.0/LibFroznFunctions-1.0.lua:387>
[string "=(tail call)"]: ?
[string "=[C]"]: in function `securecallfunction'
[string "@Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua"]:61: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:56>
[string "@Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua"]:81: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:77>
[string "@Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua"]:117: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:107>
[string "=[C]"]: in function `SetAttribute'
[string "@Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua"]:142: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:135>
[string "@Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua"]:288: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:238>
[string "=[C]"]: in function `securecallfunction'
[string "@Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua"]:235: in function <...lizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua:234>
[string "=(tail call)"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `SetAction'
[string "@Bartender4/libs/LibActionButton-1.0-117/LibActionButton-1.0.lua"]:2278: in function `SetTooltip'
[string "@Bartender4/libs/LibActionButton-1.0-117/LibActionButton-1.0.lua"]:1985: in function <...er4/libs/LibActionButton-1.0/LibActionButton-1.0.lua:1978>
[string "@Bartender4/libs/LibActionButton-1.0-117/LibActionButton-1.0.lua"]:1060: in function <...er4/libs/LibActionButton-1.0/LibActionButton-1.0.lua:1058>

Locals:
self = <table> {
 ITEM_LEVEL_PATTERN = "Item Level (%d+)"
 ITEMSTRING_PROPERTY_INDEX = <table> {
 }
 TIMEWARPED_LEVEL_ADJUST = <table> {
 }
 UPGRADED_LEVEL_ADJUST = <table> {
 }
 ITEMSTRING_PATTERN = "(item:[^|]+)"
 ScanTip = LibItemStringScanTip {
 }
 TOOLTIP_MAXLINE_LEVEL = 5
 REVISION = 4
 TIMEWARPED_WARFORGED_LEVEL_ADJUST = <table> {
 }
}
itemLink = "|cffffffff|Hitem:5512::::::::70:259:::::::::|h[Healthstone]|h|r"
tooltipData = <table> {
 dataInstanceID = 40206
 type = 0
 isAzeriteEmpoweredItem = false
 isAzeriteItem = false
 id = 5512
 hyperlink = "|cffffffff|Hitem:5512::::::::70:259:::::::::|h[Healthstone]|h|r"
 isCorruptedItem = false
 lines = <table> {
 }
}
(*temporary) = nil
(*temporary) = <table> {
 dataInstanceID = 40206
 type = 0
 isAzeriteEmpoweredItem = false
 isAzeriteItem = false
 id = 5512
 hyperlink = "|cffffffff|Hitem:5512::::::::70:259:::::::::|h[Healthstone]|h|r"
 isCorruptedItem = false
 lines = <table> {
 }
}
(*temporary) = "attempt to call field 'SurfaceArgs' (a nil value)"
LIS = <table> {
 ITEM_LEVEL_PATTERN = "Item Level (%d+)"
 ITEMSTRING_PROPERTY_INDEX = <table> {
 }
 TIMEWARPED_LEVEL_ADJUST = <table> {
 }
 UPGRADED_LEVEL_ADJUST = <table> {
 }
 ITEMSTRING_PATTERN = "(item:[^|]+)"
 ScanTip = LibItemStringScanTip {
 }
 TOOLTIP_MAXLINE_LEVEL = 5
 REVISION = 4
 TIMEWARPED_WARFORGED_LEVEL_ADJUST = <table> {
 }
}

Steps to Reproduce

Mouse over something so a tooltip spawns

Expected behavior

No error to be generated

Additional context

Yeah I have no idea where it's gone off to either...

Additional digging might imply it's no longer needed?

Version of TipTac Reborn

24.08.05

Flavor/Version of WoW

Retail 11.0.2

WanderingFox commented 3 months ago

Commenting out the two references to it in LibItemString seems to resolve the issue. Not sure what impact that has, but I'm not noticing anything. Presuming the call is no longer needed.

SteveC84 commented 3 months ago

Commenting out the two references to it in LibItemString seems to resolve the issue. Not sure what impact that has, but I'm not noticing anything. Presuming the call is no longer needed.

What exactly did you comment out?

Mythius101 commented 3 months ago

I commented out line 321 and line 327 in LibItemString.lua and seems to work

WanderingFox commented 3 months ago

Commenting out the two references to it in LibItemString seems to resolve the issue. Not sure what impact that has, but I'm not noticing anything. Presuming the call is no longer needed.

What exactly did you comment out?

There's two calls to TooltipUtil.SurfaceArgs that are no longer needed. It used to be required to populate data for tooltip scanning, but was changed to do nothing at some point in late DF. 11.0.2 removed it entirely, so now those two lines cause errors.

SteveC84 commented 3 months ago

Thank you. Much appreciated.

frozn commented 3 months ago

Thanks for figuring out that calling TooltipUtil.SurfaceArgs() is obsolete (since df 10.1.0) and can be removed. 👍

I'm now back from my vacation and fixed it. Will be included in the next release.