Adibags hard locks on MacOS
dbspringer opened this issue · 12 comments
Addon Version
v1.10.13
World of Warcraft Version
Retail
Describe the bug
Game hard locks on bag open unless Adibags addon is disabled. Unfortunately not error message was retrievable since the game hard locked before any error message was produced.
Steps to reproduce
MBP Apple M1 Max
macOS 13.3.1 (a)
Just open your bag via your favorite method.
Verification
- I have disabled all other addons and made sure this bug is triggered only with AdiBags enabled
This is not an M1 issue. It happens on X86 just the same. Based on the stacktraces I can also not see a reason why it would be macOS only. Reverting back to the previous version does fix it, so it is caused by a recent change.
also re: mac, you'd be surprised! There's another issue with the addon that is M1 only, and it makes no sense.
Oh, thank you for that bit of information @bloerwald. I'll investigate this later tonight. Do you have a reliable way to reproduce this, or is it just randomly happening?
Do you have a reliable way to reproduce this, or is it just randomly happening?
Honestly, just open bag after a reload. Before the last update, it already was very slow in re-layouting when clicking "sort bags", but now it really only requires opening.
I disabled all other addons for cleaner stack traces:
Message: Interface/AddOns/AdiBags/widgets/Section.lua:389: script ran too long
Time: Mon May 22 22:22:23 2023
Count: 1
Stack: Interface/AddOns/AdiBags/widgets/Section.lua:389: script ran too long
[string "@Interface/AddOns/AdiBags/widgets/Section.lua"]:389: in function `FullLayout'
[string "@Interface/AddOns/AdiBags/widgets/ContainerFrame.lua"]:1023: in function `ResizeToSortSection'
[string "@Interface/AddOns/AdiBags/widgets/ContainerFrame.lua"]:957: in function `UpdateButtons'
[string "@Interface/AddOns/AdiBags/widgets/ContainerFrame.lua"]:513: in function `RefreshContents'
[string "@Interface/AddOns/AdiBags/widgets/ContainerFrame.lua"]:498: in function `ResumeUpdates'
[string "@Interface/AddOns/AdiBags/widgets/ContainerFrame.lua"]:478: in function <Interface/AddOns/AdiBags/widgets/ContainerFrame.lua:470>
[string "=[C]"]: in function `Show'
[string "@Interface/AddOns/AdiBags/core/Bags.lua"]:96: in function `Open'
[string "@Interface/AddOns/AdiBags/core/Hooks.lua"]:119: in function <Interface/AddOns/AdiBags/core/Hooks.lua:116>
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "OPENALLBAGS"]:1: in function <[string "OPENALLBAGS"]:1>
Locals: self = AdiBagsSection1 {
0 = <userdata>
acquired = true
ShowHeaderTooltip = <function> defined @Interface/AddOns/AdiBags/widgets/ContainerFrame.lua:233
buttons = <table> {
}
Header = Button {
}
UpdateHeaderScripts = <function> defined @Interface/AddOns/AdiBags/widgets/ContainerFrame.lua:238
slots = <table> {
}
width = 0
count = 114
total = -9223372036854775808 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
name = "Recent Items"
category = "Backpack"
height = -9223372036854775808 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
key = "Backpack#Recent Items"
freeSlots = <table> {
}
container = AdiBagsContainer1 {
}
}
slots = <table> {
… cuts off
Message: Interface/AddOns/AdiBags/core/Bags.lua:97: script ran too long
Time: Mon May 22 22:22:23 2023
Count: 1
Stack: Interface/AddOns/AdiBags/core/Bags.lua:97: script ran too long
[string "@Interface/AddOns/AdiBags/core/Bags.lua"]:97: in function `Open'
[string "@Interface/AddOns/AdiBags/core/Hooks.lua"]:119: in function <Interface/AddOns/AdiBags/core/Hooks.lua:116>
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "OPENALLBAGS"]:1: in function <[string "OPENALLBAGS"]:1>
Locals: self = <table> {
SetDefaultModuleLibraries = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:363
isBank = false
Enable = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:290
NewModule = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:231
EnableModule = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:328
modules = <table> {
}
GetModule = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:206
IterateEmbeds = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:438
SecureHook = <function> defined @Interface/AddOns/AdiBags/libs/AceHook-3.0/AceHook-3.0.lua:335
defaultModuleLibraries = <table> {
}
PostDisable = <function> defined @Interface/AddOns/AdiBags/core/Bags.lua:231
RawHookScript = <function> defined @Interface/AddOns/AdiBags/libs/AceHook-3.0/AceHook-3.0.lua:394
SetDefaultModulePrototype = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:405
name = "AdiBags_Backpack"
IsEnabled = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:447
orderedModules = <table> {
}
bagIds = <table> {
}
DisableModule = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:346
frame = AdiBagsContainer1 {
}
baseName = "AdiBags"
Sort = <function> defined @Interface/AddOns/AdiBags/core/Bags.lua:225
RegisterMessage = <function> defined @Interface/AddOns/AdiBags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterMessage = <function> defined @Interface/AddOns/AdiBags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
AdiBags_InteractingWindowChanged = <function> defined @Interface/AddOns/AdiBags/core/Bags.lua:212
GetName = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:275
IsHooked = <function> defined @Interface/AddOns/AdiBags/libs/AceHook-3.0/AceHook-3.0.lua:492
order = 10
bagName = "Backpack"
IsModule = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:213
hooks = <table> {
}
SetDefaultModuleState = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:383
SendMessage = <function> defined @Interface/AddOns/AdiBags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
UnhookAll = <function> defined @Interface/AddOns/AdiBags/libs/AceHook-3.0/AceHook-3.0.lua:476
SetEnabledState = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:420
Hook = <function> defined @Interface/AddOns/AdiBags/libs/AceHook-3.0/AceHook-3.0.lua:273
enabledState = true
Unhook = <function> defined @Interface/AddOns/AdiBags/libs/AceHook-3.0/AceHook-3.0.lua:417
RegisterEvent = <function> defined @Interface/AddOns/AdiBags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterAllMessages = <function> defined @Interface/AddOns/AdiBags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
SecureHookScript = <function> defined @Interface/AddOns/AdiBags/libs/AceHook-3.0/AceHook-3.0.lua:409
HookScript = <function> defined @Interface/AddOns/AdiBags/libs/AceHook-3.0/AceHook-3.0.lua:365
defaultModuleState = true
IterateModules = <function> defined @Interface/AddOns/AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:433
UnregisterAllEvents = <function> defined @Interface/AddOns/AdiBags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
RawHook = <function> defined @
… cuts off
Can confirm.
2x AdiBags/core/Bags.lua:97: script ran too long
[string "@AdiBags/widgets/Section.lua"]:389: in function `FullLayout'
[string "@AdiBags/widgets/ContainerFrame.lua"]:1023: in function `ResizeToSortSection'
[string "@AdiBags/widgets/ContainerFrame.lua"]:957: in function `UpdateButtons'
[string "@AdiBags/widgets/ContainerFrame.lua"]:513: in function `RefreshContents'
[string "@AdiBags/widgets/ContainerFrame.lua"]:498: in function `ResumeUpdates'
[string "@AdiBags/widgets/ContainerFrame.lua"]:478: in function <AdiBags/widgets/ContainerFrame.lua:470>
[string "=[C]"]: in function `Show'
[string "@AdiBags/core/Bags.lua"]:96: in function `Open'
[string "@AdiBags/core/Bags.lua"]:217: in function `?'
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>
[string "=[C]"]: ?
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@AdiBags/core/Core.lua"]:512: in function `?'
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>
[string "=[C]"]: ?
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49>
[string "=(tail call)"]: ?
[string "@AdiBags/core/Bags.lua"]:97: in function `Open'
[string "@AdiBags/core/Bags.lua"]:217: in function `?'
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>
[string "=[C]"]: ?
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@AdiBags/core/Core.lua"]:512: in function `?'
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>
[string "=[C]"]: ?
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49>
[string "=(tail call)"]: ?
6x ...ags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua:20: script ran too long
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:20: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@AdiBags/core/Core.lua"]:476: in function `?'
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>
[string "=[C]"]: ?
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49>
[string "=(tail call)"]: ?
AdiBags is currently unsupported on M1 Apple machines. There is something about how Blizzard compiles WoW for the ARM chipset that breaks AdiBags, and no one on the development team has an M1 to debug these issues.
You're free to rollback to 1.10.8, but unfortunately, until Blizzard fixes whatever is broken in their process, AdiBags will likely eventually stop working altogether.
Sorry about that.
@bloerwald I'm home now and doing some testing, and as it turns out, the total
and height
variables were just not initialized at all in some cases, which makes sense as to why this would cause this bug. I've explicitly initialized them to 0, which is probably a cleaner fix.
Thanks for your time!
Alright, I'll take a look tonight. I suspect there's some sort of infinite loop going on with some of the rendering changes made to speed up bag opening, but it seems to only be triggering in certain cases.
There seems indeed to be some weird stuff with the two negative variables:
if self.total < 0 then
return
end
if self.height < 0 then
return
end
in :FullLayout()
and it works perfectly. Apparently it either is initialised with bogus state, or is called while there are updates to the state and it breaks.
-9223372036854775808
isn't random, it is -0x80000000'00000000
.
Yes, I noticed that too in your stack -- do you want to send a PR with the change and I'll review? I need to test it across multiple products. I'm not too keen on hunting down this bug, as the whole rendering engine is slated to be redone into a more modular system this summer.
I don't really think it is a good fix and I have no idea whether it breaks something else. I can make a PR for it, sure, but personally probably wouldn't merge it for being too hacky :D
Oh it's a terrible fix, don't get me wrong. I just wanted to make sure you got credit for contributing if you wanted to -- no pressure or anything. I won't be merging it until I get home anyway.
I do want to spend time fixing this the right way, but I don't want to spend a ton of time on this when I plan on a total rewrite of some of the core components here. The layout and rendering code has not aged well, and it's current design hampers another major project I have going (grid based section layout), so I don't want to spend too much time fixing it properly.