BadBoy: Spam Blocker & Reporter

BadBoy: Spam Blocker & Reporter

14M Downloads

ADDON_ACTION_BLOCKED when scrolling a filtered list, then going to new search

0xbs opened this issue · 11 comments

commented

This is a duplicate of 0xbs/premade-groups-filter#1 but also applies to this addon. A collaborative fix is appreciated.

Steps to reproduce

  1. Open a premade group search that contains spam and has enough results that the scrollbar is visible.
  2. You should see the blue colored message that groups were filtered
  3. Scroll the list
  4. Click the back button and select a different category (e.g. go from quests to dungeons)
  5. ADDON_ACTION_BLOCKED will prevent searching, the Searching... spinner is loading forever
  6. Every time you select a new search category, the error will prevent searching

Workaround

Click the reload button in the upper right corner of the premade groups UI.

Error message

2x [ADDON_ACTION_BLOCKED] AddOn 'BadBoy' hat versucht die geschützte Funktion 'Search()' 
aufzurufen.
!BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
[C]: in function `Search'
FrameXML\LFGList.lua:1708: in function `LFGListSearchPanel_DoSearch'
FrameXML\LFGList.lua:553: in function `LFGListCategorySelection_StartFindGroup'
FrameXML\LFGList.lua:543: in function <FrameXML\LFGList.lua:536>
commented

This is a blizz problem.
I located Blizz code attempting to perform a search without a hardware event, blaming addons for taint https://www.townlong-yak.com/framexml/7.2.0/LFGList.lua#117

LFGListFrame_CheckPendingQuestIDSearch(self) calls LFGListFrame_BeginFindQuestGroup(self, questID)
LFGListFrame_BeginFindQuestGroup(self, questID) calls LFGListCategorySelection_StartFindGroup(panel, questName, questID)
LFGListCategorySelection_StartFindGroup(self, searchText, questID) calls LFGListSearchPanel_DoSearch(searchPanel)
LFGListSearchPanel_DoSearch(searchPanel) calls C_LFGList.Search(self.categoryID, searchText, self.filters, self.preferredFilters, languages)

All of this is done without a hardware event. So if any addon has modified any variables during this execution path, it will be blamed for blocking it.

Unfortunately there is no way to cleanly (without editing Blizz variables) modify the LFG results.
This is an oversight on Blizz's part, since nothing should be trying to search without being "powered" by a hardware event.
I've reported it to a Blizz dev, but I'm not sure what the outcome will be, and if we should bother trying to work around it.

For now, the only problem this causes is the searching gets stuck, which you can fix by clicking the refresh button.

commented

I do no think that LFGListFrame_CheckPendingQuestIDSearch is the issue to be honest. Add a hook with a print() on that function (or any other function that is called from that function). You will not see any call at any time. The function also checks if a questID is set, which is usually not the case.

The call stack also tells us that there was a button click at the beginning. So we have a hardware event and should be fine anyway. But we aren't. Also this does not explain why scrolling causes the problem.

The whole problem has most likely to be fixed on Blizzard's side, but I don't think it is as simple as fixing that function.

commented

I have not seen the problem with scrolling, only on initial search.

I'm not sure why Seach would be called whilst scrolling, it would erase your results. So I assume you've missed something there.

commented

Have you actually read and done the "Steps to reproduce" above? Of course the error does not happen while scolling...

commented

Also this does not explain why scrolling causes the problem.

I mean, try reading before posting? If you want to state that it's only AFTER scrolling and clicking back, then say that. Otherwise, I'll conclude that you mean exactly what you're typing.

commented

Sorry for being a jerk. Yes, the error shows up only after scrolling, clicking back and starting a new search. Just like I said in the steps. But the error is not thrown when you do not scroll. So it got something to do with the scrolling.

I know that the scrolling is not real scrolling, but re-using the existing 8 or 10 group templates. This or something else fundamentally taints some important parts of the Blizzard code.

commented

The problem is between the OnClick function and the search happening, there are multiple functions that require hardware events, and a hardware event can only be used for 1 hardware function.

Blizz is now looking into it.

commented

Great news, let's hope they fix it.

commented

Like I said in the PM once these are resolved moving back to the secure hook should be possible.

In the meantime you may wish to consider using the OnShow hook like BadBoy does so that filtering is preserved when toggling the frame open and closed (keyboard button i)

commented
4x [ADDON_ACTION_BLOCKED] AddOn 'PremadeGroupsFilter' tried to call the protected function 'RemoveApplicant()'.
FrameXML\LFGList.lua:1116: in function `onEvent'
FrameXML\LFGList.lua:203: in function <FrameXML\LFGList.lua:107>

Another one that should be resolved in 7.2.5

commented

New patch out, problem resolved.