Bagnon

Bagnon

124M Downloads

Bag frame doesn't open if lib-gratuity is loaded ahead of bagnon

WanderingFox opened this issue ยท 2 comments

commented

Running Software (issues missing this information will be deleted):

  • Addon version: Bagnon-8.2.27-8.2.5
  • Server patch: 8.2.5.32750

Have you read the changelog? (please don't waste our time)
Yes

Describe the bug
Bags fail to load with a c-stack overflow if LibGratuity is loaded before Bagnon. Appears to be an issue with Wildpants

To Reproduce
Steps to reproduce the behaviour:

  1. Load LibGratuity-3.0 before Bagnon (eg. another addon loads it first)
  2. Attempt to open any bag frame (inventory, bank, guild, etc)
  3. C-Stack overflow occurs in LibGratuity stemming from Wildpants

Expected behaviour
Bags should open as expected

Screenshots
N/A bags fail to open

Error Logs

2x ...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: C stack overflow
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <...Ons\Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...
...Ons\Bagnon\common\Wildpants\features\autoDisplay.lua:90: in function `?'
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[C]: ?
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:64: in function `SendMessage'
...Wildpants\libs\LibItemCache-2.0\LibItemCache-2.0-26.lua:58: in function <...Wildpants\libs\LibItemCache-2.0\LibItemCache-2.0.lua:58>
[C]: ?
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:64: in function `Fire'
Ace3\AceEvent-3.0\AceEvent-3.0-4.lua:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

Locals:
self = <table> {
 GetLibraryVersion = <function> defined @LDB_Guild\lib\TabletLib\AceLibrary\AceLibrary.lua:585
 argCheck = <function> defined @LDB_Guild\lib\TabletLib\AceLibrary\AceLibrary.lua:129
 error = <function> defined @LDB_Guild\lib\TabletLib\AceLibrary\AceLibrary.lua:75
 pcall = <function> defined @LDB_Guild\lib\TabletLib\AceLibrary\AceLibrary.lua:167
}
key = "IsItemCache"
(*temporary) = nil
(*temporary) = nil
(*temporary) = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227
(*temporary) = <table> {
 GetLibraryVersion = <function> defined @LDB_Guild\lib\TabletLib\AceLibrary\AceLibrary.lua:585
 argCheck = <function> defined @LDB_Guild\lib\TabletLib\AceLibrary\AceLibrary.lua:129
 error = <function> defined @LDB_Guild\lib\TabletLib\AceLibrary\AceLibrary.lua:75
 pcall = <function> defined @LDB_Guild\lib\TabletLib\AceLibrary\AceLibrary.lua:167
}
(*temporary) = "IsItemCache"
(*temporary) = "C stack overflow"
lib = <table> {
 GetLine = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:178
 SetSpellBookItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 GetText = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:156
 SetHyperlink = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetShapeshift = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 FindDeformat = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:128
 SetPlayerBuff = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetCraftItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetQuestRewardSpell = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 MultiFind = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:114
 SetPetAction = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetUnitDebuff = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 CreateSetMethods = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:206
 NumLines = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:67
 Erase = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:51
 SetInboxItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetBuybackItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetGuildBankItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetUnitBuff = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetMerchantItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetQuestLogItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetUnit = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetTradeTargetItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetSpellByID = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetCraftSpell = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 CreateTooltip = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:32
 SetSendMailItem = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:210
 SetTrainerService = <function> defined @Baggins\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:21

Additional context
Happens regardless of what addon loads lib gratuity

4x aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: C stack overflow
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
aaa\Libs\LibGratuity-3.0\LibGratuity-3.0-90042.lua:235: in function <aaa\Libs\LibGratuity-3.0\LibGratuity-3.0.lua:227>
...
...Ons\Bagnon\common\Wildpants\features\autoDisplay.lua:90: in function `?'
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[C]: ?
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:64: in function `SendMessage'
...Wildpants\libs\LibItemCache-2.0\LibItemCache-2.0-26.lua:58: in function <...Wildpants\libs\LibItemCache-2.0\LibItemCache-2.0.lua:58>
[C]: ?
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua:64: in function `Fire'
Ace3\AceEvent-3.0\AceEvent-3.0-4.lua:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

aaa.toc

## Interface: 80205
## Version: v3.1.9
## Title: aaa

Libs\LibGratuity-3.0\lib.xml
commented

@Jaliborc Okay I give up. Why is this invalid? It breaks on the latest version of the wow client with the latest version of your addon with the latest Ace3 libs and nothing else installed.

You're welcome to not fix it, but closing it as invalid doesn't make any sense to me your code (specifically wildpants) is breaking. Hell you even have similar open issues about this: #803 #755 #750

commented

I can see that the library is using extremely old and deprecated dependencies.
There is no AceLibrary in Ace3. The latest version of Gratuity is 6 years old. It's also loading even older and deprecated dependencies.

So whatever it is doing with CallbackHandler and how da heck it ever calls LibItemCache only god knows. My libraries sure are following the API by the book. It looks like Gratuity or AceLibrary is doing some metatable stuff that LibStub-based architecture of Ace3 doesn't account for. Soon as someone iterates LibStub, things blow up.

Nothing I can do from my end except not using LibStub - which is not a valid option as far as I am concerned.