BetterBags icon indicating copy to clipboard operation
BetterBags copied to clipboard

Can't use consumables/usable items from bag on Cataclysm

Open capSAR273 opened this issue 10 months ago • 18 comments

Addon Version

0.3.18

World of Warcraft Version

Cataclysm

Describe the bug

Right clicking potions/quest items/etc doesn't do anything

Steps to reproduce

  1. Open bag
  2. Right click a potion/flask/usable item

capSAR273 avatar Feb 19 '25 22:02 capSAR273

Same, getting this error:

4x [ADDON_ACTION_FORBIDDEN] AddOn 'BetterBags' tried to call the protected function 'UNKNOWN()'. [string "@!BugGrabber/BugGrabber.lua"]:485: in function <!BugGrabber/BugGrabber.lua:485> [string "=[C]"]: ? [string "=[C]"]: ? [string "=[C]"]: ? [string "=[C]"]: ? [string "=[C]"]: in function UseContainerItem' [string "@Blizzard_UIPanels_Game/Classic/ContainerFrame_Shared.lua"]:1352: in function ContainerFrameItemButton_OnClick' [string "*ContainerFrame.xml:163_OnClick"]:13: in function <[string "*ContainerFrame.xml:163_OnClick"]:1>

Locals: _ = Frame { } event = "ADDON_ACTION_FORBIDDEN" events =

{ }

jelmerj avatar Feb 20 '25 18:02 jelmerj

Same Here 3x [ADDON_ACTION_FORBIDDEN] AddOn 'BetterBags' hat versucht die geschützte Funktion 'UNKNOWN()' aufzurufen. [string "@!BugGrabber/BugGrabber.lua"]:485: in function <!BugGrabber/BugGrabber.lua:485> [string "=[C]"]: ? [string "=[C]"]: ? [string "=[C]"]: ? [string "=[C]"]: in function UseContainerItem' [string "@Blizzard_UIPanels_Game/Classic/ContainerFrame_Shared.lua"]:1352: in function <...zard_UIPanels_Game/Classic/ContainerFrame_Shared.lua:1299> [string "=[C]"]: in function ContainerFrameItemButton_OnClick' [string "*ContainerFrame.xml:163_OnClick"]:13: in function <[string "*ContainerFrame.xml:163_OnClick"]:1>

Locals: _ = Frame { } event = "ADDON_ACTION_FORBIDDEN" events =

{ }

dex97er avatar Feb 20 '25 20:02 dex97er

@Cidan this bug makes the addon actually unusable, I cant use any HS, Enchants, Potions or anything that is "activatable"

I just did some testing, enabling only Betterbag doesnt bug.

But as soon as TradeSkillMaster is enabled the AddOn bugs out instantly. Without TSM it does bug out at some point later and needs a reload to work again.

7x [ADDON_ACTION_FORBIDDEN] AddOn 'BetterBags' tried to call the protected function 'UNKNOWN()'.
[string "@!BugGrabber/BugGrabber.lua"]:485: in function <!BugGrabber/BugGrabber.lua:485>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `UseContainerItem'
[string "@Blizzard_UIPanels_Game/Classic/ContainerFrame_Shared.lua"]:1352: in function `ContainerFrameItemButton_OnClick'
[string "*ContainerFrame.xml:163_OnClick"]:13: in function <[string "*ContainerFrame.xml:163_OnClick"]:1>

Locals:
_ = Frame {
}
event = "ADDON_ACTION_FORBIDDEN"
events = <table> {
}

Trikas77 avatar Feb 21 '25 10:02 Trikas77

I'll notify the TSM developers in case they have any suggestions.

capSAR273 avatar Feb 21 '25 13:02 capSAR273

taint.log

I enabled the taint log and this is the output if it helps @Cidan

capSAR273 avatar Feb 21 '25 13:02 capSAR273

It seems to be something related to this change: https://github.com/Gethe/wow-ui-source/blame/classic/Interface/AddOns/Blizzard_UIPanels_Game/Classic/ContainerFrame_Shared.lua#L1338

AuctionHouseFrame is becoming tainted.

The stack trace for that variable becoming tainted is inside the C_AddOns.LoadAddOn("Blizzard_AuctionHouseUI") call in TSM (TradeSkillMaster\Core\UI\AuctionUI\Core.lua:59). The taint log attributes this to the BetterBags addon.

I hope this helps.

fryguy1013 avatar Feb 22 '25 02:02 fryguy1013

A TSM user and can confirm this bug in the recent version.

A workaround (without disabling either) is dragging the item on the bar and clicking it from there - that still works.

navara avatar Feb 23 '25 16:02 navara

Is this issue still being looked at? I asked Gumdrops (Someone connected to TSM, i think he's a dev, but not 100% sure) about this, and he said the following after testing:

gumdropsEU

This doesn't appear to be related to TSM, the issue is reproducible with only BetterBags. We tried some other bag addons and only BetterBags is causing the issue.

Atm in Classic WoW Cata its very hard to use Betterbags due to this issue.

Chronia82 avatar Feb 28 '25 14:02 Chronia82

Cidan said in discord that he is currently very busy but he will try to create a fix for this bug this weekend

dex97er avatar Feb 28 '25 16:02 dex97er

I was getting the same behavior with TSM disabled, so must be something else. Reload helped for a while.

navara avatar Feb 28 '25 16:02 navara

Cidan said in discord that he is currently very busy but he will try to create a fix for this bug this weekend

Thank you for the update!

@navara yeah, i can replicate that also. With TSM disabled the error also occurs, but it takes longer.

Chronia82 avatar Feb 28 '25 22:02 Chronia82

Cidan said in discord that he is currently very busy but he will try to create a fix for this bug this weekend

any new information on that?

Jonnnyki avatar Mar 10 '25 16:03 Jonnnyki

Cidan said in discord that he is currently very busy but he will try to create a fix for this bug this weekend

any new information on that?

I only know what was written about it in discord and unfortunately nothing further happened after that

dex97er avatar Mar 11 '25 02:03 dex97er

A simple reproducible scenario. Disable all addons except BetterBags, talk to auctioneer, try to use hearthstone in bags.

fryguy1013 avatar Mar 11 '25 04:03 fryguy1013

I figured it out. In core/constants.lua I added and not addon.isCata to this:

if not addon.isRetail and not addon.isCata then
  Enum.ItemQuality.Poor = 0
  Enum.ItemQuality.Common = 1
  Enum.ItemQuality.Uncommon = 2
  Enum.ItemQuality.Rare = 3
  Enum.ItemQuality.Epic = 4
  Enum.ItemQuality.Legendary = 5
  Enum.ItemQuality.Artifact = 6
  Enum.ItemQuality.Heirloom = 7
  Enum.ItemQuality.WoWToken = 8
end

I added this section above:

local IQ = IQ or {
  Poor = 0,
  Common = 1,
  Uncommon = 2,
  Rare = 3,
  Epic = 4,
  Legendary = 5,
  Artifact = 6,
  Heirloom = 7,
  WoWToken = 8,
}

Then replaced all references to Enum.ItemQuality with IQ in that file.

This seemed to fix it for Cataclysm. I have no idea why Enum.ItemQuality isn't loaded into the global scope when this script is ran but seems to be loaded later on. This fixes my issue, but there's probably a much better way to do it so I won't open a PR.

fryguy1013 avatar Mar 11 '25 05:03 fryguy1013

Here's the finished constants.lua file: https://pastebin.com/LXWQLjxH

Thank you for the fix @fryguy1013 , seems like it works now.

capSAR273 avatar Mar 15 '25 02:03 capSAR273

My fix breaks the bank btw. I changed it to just make a copy into the const table like so:

if not addon.isRetail then
  const.ItemQuality = {
    Poor = 0,
    Common = 1,
    Uncommon = 2,
    Rare = 3,
    Epic = 4,
    Legendary = 5,
    Artifact = 6,
    Heirloom = 7,
    WoWToken = 8,
  }
else
  const.ItemQuality = Enum.ItemQuality
end

and changed all the references to use const.ItemQuality instead of Enum.ItemQuality and make sure every file included it.

fryguy1013 avatar Mar 15 '25 02:03 fryguy1013

How does it break the bank? I haven't observed any issues.

Anyway, imho it's time for the pull request, even as a workaround. It doesn't seem Cidan will be able to fix it anytime soon.

navara avatar Mar 15 '25 09:03 navara

these are fixed

Cidan avatar Oct 05 '25 21:10 Cidan