Premade Groups Filter

Premade Groups Filter

9M Downloads

GetApplicationInfo(resultID) Error

ljlevend opened this issue ยท 14 comments

commented

I get this error in game when moving the mouse over a listing in the Dungeon groups list.

Message: Interface/AddOns/PremadeGroupsFilter/Main.lua:206: Usage: GetApplicationInfo(resultID)
Time: Tue Dec 20 20:31:02 2022
Count: 1
Stack: Interface/AddOns/PremadeGroupsFilter/Main.lua:206: Usage: GetApplicationInfo(resultID)
[string "=[C]"]: in function `?'
[string "@Interface/AddOns/PremadeGroupsFilter/Main.lua"]:581: in function <Interface/AddOns/PremadeGroupsFilter/Main.lua:319>
[string "=[C]"]: ?
[string "=[C]"]: in function `LFGListUtil_SortSearchResults'
[string "@Interface/FrameXML/LFGList.lua"]:2125: in function `LFGListSearchPanel_UpdateResultList'
[string "@Interface/FrameXML/LFGList.lua"]:2033: in function `onEvent'
[string "@Interface/FrameXML/LFGList.lua"]:218: in function <Interface/FrameXML/LFGList.lua:139>

Locals: (*temporary) = <table> {
 1 = 893
 2 = 887
 3 = 890
 4 = 894
 5 = 896
 6 = 892
 7 = 885
 8 = 897
}
(*temporary) = <function> defined @Interface/AddOns/PremadeGroupsFilter/Main.lua:132
(*temporary) = 885
(*temporary) = 887
(*temporary) = nil
commented

From the stacktrace, it looks like the error did not occur on hovering with the mouse but when doing a search or applying to a group.

  1. Are you sure you get an error when just hovering over an entry? If yes, is this really the exact error?
  2. Do you get a error on every list entry or just some of them?
  3. Do you get an error on arbitrary searches or just sometimes on specific search results?
  4. Do you get an error with just PGF and no other addon installed?
commented

Sorry, I could be wrong about the error occur on hovering with the mouse. Lets assume that you are correct about it occurring when doing a search or applying to a group. I will pay closer attention to the specific conditions that cause this issue to occur and update you if I have more information. Thanks.

commented

Do you have ElvUI installed? ElvUI bug #539 is sometimes incorrectly being reported as a PGF bug.

commented

I do not have ElvUI installed. The error occurs when I click the "Sign Up" button, not when I hover over a group as I initially reported (sorry about that). So far the error has only occurred after I click the "Sign Up" button while I already have at least two pending requests to join a group.

commented

Would be interesting to know the exact cause. From your report is looks like the second ID is either nil or not a number.

My fix would be

    if not searchResultID1 or type(searchResultID1) ~= "number" then return false end
    if not searchResultID2 or type(searchResultID2) ~= "number" then return true end

at the top of the function SortByFriendsAndAge

commented

Would be interesting to know the exact cause. From your report is looks like the second ID is either nil or not a number.

yeah it's definitely the "searchResultID2"
i will test it further today

commented

same here

6x PremadeGroupsFilter/Main.lua:206: Usage: GetApplicationInfo(resultID)
[string "=[C]"]: in function `GetApplicationInfo'
[string "@PremadeGroupsFilter/Main.lua"]:206: in function <PremadeGroupsFilter/Main.lua:203>
[string "=(tail call)"]: ?
[string "=[C]"]: in function `?'
[string "@PremadeGroupsFilter/Main.lua"]:581: in function <PremadeGroupsFilter/Main.lua:319>
[string "=[C]"]: in function `LFGListUtil_SortSearchResults'
[string "@FrameXML/LFGList.lua"]:2125: in function `LFGListSearchPanel_UpdateResultList'
[string "@FrameXML/LFGList.lua"]:2033: in function `onEvent'
[string "@FrameXML/LFGList.lua"]:218: in function <FrameXML/LFGList.lua:139>

Locals:
(*temporary) = nil

happens when "sign up" multiple groups at the same time, over and over again

i do a test now and "check" the values for nil and type = number with this:

if (not searchResultID1) or (not searchResultID2) or type(searchResultID1) ~= "number" or type(searchResultID2) ~= "number" then return end

and i will report back later, after i've done some mythics

commented

I did some runs over the holidays but never got the error. Not sure what's different on my machine, maybe different set of other addons.

commented

I did some runs over the holidays but never got the error. Not sure what's different on my machine, maybe different set of other addons.

I did also some runs now BUT just solo last days and also had no errors yet and i did not change any of my addons (fix included!)

But i remember the error happend if i queue as a group, maybe this is the reason?!
Im gonna try to test this next days and will report back.

commented

Good find. I've always been in a party with my friend when I sign up for a group so that could be related to the issue.

commented

Got another Error today with "your fix" active -> Invalid Sorting:

You need to Queue a Listed Group but your Group need 2+ Players who are already in Group and the error occurs if the Listed Group accept your group to join!

And as we already Expected the searchResultID2 is nil at this time -> this cause the error
so searchResultID2 needs an error check or better both of them 1 and 2

2x PremadeGroupsFilter/Main.lua:594: invalid order function for sorting
[string "=[C]"]: in function `?'
[string "@PremadeGroupsFilter/Main.lua"]:594: in function <PremadeGroupsFilter/Main.lua:332>
[string "=[C]"]: in function `LFGListUtil_SortSearchResults'
[string "@FrameXML/LFGList.lua"]:2125: in function `LFGListSearchPanel_UpdateResultList'
[string "@FrameXML/LFGList.lua"]:2033: in function `onEvent'
[string "@FrameXML/LFGList.lua"]:218: in function <FrameXML/LFGList.lua:139>

Locals:
(*temporary) = <table> {
 1 = 2045
 2 = 2034
 3 = 2059
 4 = 2019
 5 = 2083
}
(*temporary) = <function> defined @PremadeGroupsFilter/Main.lua:132
(*temporary) = 2019
(*temporary) = 2034
(*temporary) = nil
commented

it's not fixed with this ^^
as i already said, i got this Error WHILE the "fix" was in the SortByFriendsAndAge function!
:

2x PremadeGroupsFilter/Main.lua:584: invalid order function for sorting
[string "=[C]"]: in function `?'
[string "@PremadeGroupsFilter/Main.lua"]:584: in function <PremadeGroupsFilter/Main.lua:322>
[string "=[C]"]: in function `LFGListUtil_SortSearchResults'
[string "@FrameXML/LFGList.lua"]:2125: in function `LFGListSearchPanel_UpdateResultList'
[string "@FrameXML/LFGList.lua"]:2033: in function `onEvent'
[string "@FrameXML/LFGList.lua"]:218: in function <FrameXML/LFGList.lua:139>

Locals:
(*temporary) = <table> {
 1 = 3028
 2 = 2987
 3 = 2942
 4 = 2971
 5 = 3019
 6 = 2968
 7 = 2973
}
(*temporary) = <function> defined @PremadeGroupsFilter/Main.lua:132
(*temporary) = 2942
(*temporary) = 2987
(*temporary) = nil

This is "new" error (as you can see) but this error is caused by the "fix" it seems!
It comes from the table.sort(results, PGF.SortByExpression) what executes the SortByExpression what on the other hand executes the SortByFriendsAndAge -> here we are again, something is wrong there ^^

Updated the Error with the new "fixed" version.
It still happens if you Queue as a group for an existing Group, means 2+ Players want to join 2+ Players

commented

I can confirm that the error is not fixed. Do the following to reproduce the issue:

  1. Be the leader of a group of 2 players.
  2. Sign up to join other groups. For me the issue only occurs after my group has signed up for 2+ groups.
commented

Thanks for the report, let's continue the discussion on #135 which is the same bug.