Compact Vendor

Compact Vendor

16.5k Downloads

Unable to use text filter

biggianteye opened this issue ยท 2 comments

commented

I am using version v10.0.2.221230 and I get the following error when I enter any text into the search box:

Message: ...AddOns/CompactVendor/libs/ItemSearch-1.3/Filters.lua:44: attempt to index field 'args' (a nil value)
Time: Sun May 14 21:05:39 2023
Count: 1
Stack: ...AddOns/CompactVendor/libs/ItemSearch-1.3/Filters.lua:44: attempt to index field 'args' (a nil value)
[string "@Interface/AddOns/CompactVendor/libs/ItemSearch-1.3/Filters.lua"]:44: in function <...AddOns/CompactVendor/libs/ItemSearch-1.3/Filters.lua:37>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua"]:115: in function `Filter'
[string "@Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua"]:87: in function `Match'
[string "@Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua"]:49: in function `MatchAny'
[string "@Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua"]:39: in function <...actVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:37>
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "@Interface/AddOns/CompactVendor/core.lua"]:2164: in function `filter'
[string "@Interface/AddOns/CompactVendor/core.lua"]:2036: in function `ApplyFilters'
[string "@Interface/AddOns/CompactVendor/core.lua"]:2058: in function `Refresh'
[string "@Interface/AddOns/CompactVendor/core.lua"]:2152: in function <Interface/AddOns/CompactVendor/core.lua:2145>
[string "@Interface/AddOns/CompactVendor/core.lua"]:2197: in function <Interface/AddOns/CompactVendor/core.lua:2195>

Locals: self = <table> {
 match = <function> defined @Interface/AddOns/CompactVendor/libs/ItemSearch-1.3/Filters.lua:37
 canSearch = <function> defined @Interface/AddOns/CompactVendor/libs/ItemSearch-1.3/Filters.lua:33
 onlyTags = false
 tags = <table> {
 }
}
item = <table> {
 link = "[Virtuoso Inking Set]"
}
_ = nil
search = "a"
where = nil
data = <table> {
 dataInstanceID = 22038
 type = 0
 isAzeriteEmpoweredItem = false
 isAzeriteItem = false
 id = 39505
 hyperlink = "[Virtuoso Inking Set]"
 isCorruptedItem = false
 lines = <table> {
 }
}
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 1 = <table> {
 }
 2 = <table> {
 }
 3 = <table> {
 }
 4 = <table> {
 }
 5 = <table> {
 }
 6 = <table> {
 }
}
(for control) = 1
i = 1
line = <table> {
 leftColor = <table> {
 }
 type = 29
 leftText = "Virtuoso Inking Set"
}
(*temporary) = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:132
(*temporary) = <table> {
 object = <table> {
 }
 filters = <table> {
 }
 OR = "or"
 NOT_MATCH = "not"
 NOT = "Not"
 Find = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:132
 Match = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:55
 MatchAny = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:47
 ACCENTS = <table> {
 }
 MatchAll = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:37
 UseFilter = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:122
 Compare = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:152
 Matches = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:28
 Filter = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:100
 Clean = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:141
}
(*temporary) = "a"
(*temporary) = nil
(*temporary) = "attempt to index field 'args' (a nil value)"
C = <table> {
 TooltipInfo = <table> {
 }
 CurrencyInfo = <table> {
 }
 Container = <table> {
 }
}
Parser = <table> {
 object = <table> {
 }
 filters = <table> {
 }
 OR = "or"
 NOT_MATCH = "not"
 NOT = "Not"
 Find = <function> defined @Interface/AddOns/CompactVendor/libs/CustomSearch-1.0/CustomSearch-1.0.lua:132
 Match = <function> defined @Interface/AddOns

The line it is complaining about is this one:

if Parser:Find(search, line.args[2].stringVal) then

I have looked back at previous versions and the last version where the text filter was working was v10.0.0.221026. The first version where I found it wasn't working was v10.0.2.221225. I was unable to check any of the versions in between these because the addon doesn't work at all for these versions (bad arg to ipairs error).

Unfortunately there's a lot of code change between those two versions, so I have been unable to spot where the problem might have been introduced:
v10.0.0.221026...v10.0.2.221225

commented

The latest update should have fixed this issue, it was due to changes to the tooltip scanning system in the latest patch.

(On a side-note, searching will be fixed soon when I update the libraries to a newer version that also supports the tooltip changes.)

commented

Looks like it was introduced in the upgrade from ItemSearch-1.2 to ItemSearch-1.3. The error has also been reported there and fixed on 5th May. I've used the latest version of those files and the problem appears to be resolved.