Cidan / BetterBags

A total replacement AddOn for World of Warcraft bag frames, inspired by AdiBags.
MIT License
89 stars 38 forks source link

script ran too long #258

Closed raegx closed 7 months ago

raegx commented 8 months ago

Addon Version

v0.1.9

World of Warcraft Version

Retail

Describe the bug

Zoned into a Rise instance for M+, got the following:

3x ...ags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua:20: script ran too long
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:20: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@BetterBags/core/events.lua"]:148: in function <BetterBags/core/events.lua:147>

Locals:
Skipped (In Encounter)

Has happened for the last few days doing M+.

Steps to reproduce

  1. Install BetterBags
  2. Zone into Rise
AMaribo commented 8 months ago

I am receiving the same error. As far as I can tell, it only occurs when zoning into Dawn of the Infinites while in a group.

image

4x BetterBags/frames/item.lua:190: script ran too long
[string "@BetterBags/frames/item.lua"]:190: in function `Unlock'
[string "@BetterBags/frames/item.lua"]:169: in function `SetLock'
[string "@BetterBags/frames/item.lua"]:261: in function `SetItem'
[string "@BetterBags/views/gridview.lua"]:87: in function `Render'
[string "@BetterBags/frames/bag.lua"]:213: in function `Draw'
[string "@BetterBags/core/init.lua"]:141: in function `cb'
[string "@BetterBags/core/events.lua"]:45: in function <BetterBags/core/events.lua:40>
[string "=[C]"]: ?
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@BetterBags/core/events.lua"]:148: in function <BetterBags/core/events.lua:147>

Locals:
self = <table> {
 NormalTexture = BetterBagsItemButton466NormalTexture {
 }
 kind = 0
 Stock = BetterBagsItemButton466Stock {
 }
 data = <table> {
 }
 LockTexture = BetterBagsItemButton466LockButton {
 }
 IconOverlay = Texture {
 }
 isFreeSlot = false
 ilvlText = FontString {
 }
 Count = BetterBagsItemButton466Count {
 }
 button = BetterBagsItemButton466 {
 }
 IconQuestTexture = BetterBagsItemButton466IconQuestTexture {
 }
 frame = BetterBagsItemButton466parent {
 }
 Cooldown = BetterBagsItemButton466Cooldown {
 }
 IconTexture = BetterBagsItemButton466IconTexture {
 }
}
itemLocation = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 15
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = <function> defined =[C]:-1
(*temporary) = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 15
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = 15
(*temporary) = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 15
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = "script ran too long"
database = <table> {
 SetDefaultModuleLibraries = <function> defined @BetterBags/libs/AceAddon-3.0/AceAddon-3.0.lua:363
 Migrate = 
Cidan commented 8 months ago

The debug window shows a full redraw happening. Do either of you happen to have the bag slots showing when this happens?

raegx commented 8 months ago

image

Don't think so.

raegx commented 8 months ago

Also just got this doing Rise, yet again:

3x BetterBags/frames/item.lua:190: script ran too long
[string "@BetterBags/frames/item.lua"]:190: in function `Unlock'
[string "@BetterBags/frames/item.lua"]:169: in function `SetLock'
[string "@BetterBags/frames/item.lua"]:261: in function `SetItem'
[string "@BetterBags/views/gridview.lua"]:87: in function `Render'
[string "@BetterBags/frames/bag.lua"]:219: in function `Draw'
[string "@BetterBags/core/init.lua"]:141: in function `cb'
[string "@BetterBags/core/events.lua"]:45: in function <BetterBags/core/events.lua:40>
[string "=[C]"]: ?
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@BetterBags/core/events.lua"]:148: in function <BetterBags/core/events.lua:147>

Locals:
self = <table> {
 NormalTexture = BetterBagsItemButton571NormalTexture {
 }
 kind = 0
 Stock = BetterBagsItemButton571Stock {
 }
 data = <table> {
 }
 LockTexture = BetterBagsItemButton571LockButton {
 }
 IconOverlay = Texture {
 }
 isFreeSlot = false
 ilvlText = FontString {
 }
 Count = BetterBagsItemButton571Count {
 }
 button = BetterBagsItemButton571 {
 }
 IconQuestTexture = BetterBagsItemButton571IconQuestTexture {
 }
 frame = BetterBagsItemButton571parent {
 }
 Cooldown = BetterBagsItemButton571Cooldown {
 }
 IconTexture = BetterBagsItemButton571IconTexture {
 }
}
itemLocation = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 20
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = <function> defined =[C]:-1
(*temporary) = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 20
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = 20
(*temporary) = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 20
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = "script ran too long"
database = <table> {
 SetDefaultModuleLibraries = <function> defined @BetterBags/libs/AceAddon-3.0/AceAddon-3.0.lua:363
 Migrate = 
Cidan commented 8 months ago

Alright, let me put out the latest Alpha to release in a few, which should fix the blank bags issue

Cidan commented 8 months ago

I just pushed 0.1.10 to all addon sites, should be up soon. I don't think this will fix the script ran too long issue, but it should fix bag draw (unless you hit that script issue).

I'll work on the script timeout issue tonight.

raegx commented 7 months ago

v0.1.10 seems to have no change in behavior.

5x BetterBags/frames/item.lua:190: script ran too long
[string "@BetterBags/frames/item.lua"]:190: in function `Unlock'
[string "@BetterBags/frames/item.lua"]:169: in function `SetLock'
[string "@BetterBags/frames/item.lua"]:261: in function `SetItem'
[string "@BetterBags/views/gridview.lua"]:87: in function `Render'
[string "@BetterBags/frames/bag.lua"]:219: in function `Draw'
[string "@BetterBags/core/init.lua"]:141: in function `cb'
[string "@BetterBags/core/events.lua"]:45: in function <BetterBags/core/events.lua:40>
[string "=[C]"]: ?
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@BetterBags/core/events.lua"]:148: in function <BetterBags/core/events.lua:147>

Locals:
self = <table> {
 NormalTexture = BetterBagsItemButton571NormalTexture {
 }
 kind = 0
 Stock = BetterBagsItemButton571Stock {
 }
 data = <table> {
 }
 LockTexture = BetterBagsItemButton571LockButton {
 }
 IconOverlay = Texture {
 }
 isFreeSlot = false
 ilvlText = FontString {
 }
 Count = BetterBagsItemButton571Count {
 }
 button = BetterBagsItemButton571 {
 }
 IconQuestTexture = BetterBagsItemButton571IconQuestTexture {
 }
 frame = BetterBagsItemButton571parent {
 }
 Cooldown = BetterBagsItemButton571Cooldown {
 }
 IconTexture = BetterBagsItemButton571IconTexture {
 }
}
itemLocation = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 20
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = <function> defined =[C]:-1
(*temporary) = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 20
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = 20
(*temporary) = <table> {
 Clear = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:46
 slotIndex = 20
 HasAnyLocation = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:42
 IsValid = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML/ObjectAPI/ItemLocation.lua:88
}
(*temporary) = "script ran too long"
database = <table> {
 SetDefaultModuleLibraries = <function> defined @BetterBags/libs/AceAddon-3.0/AceAddon-3.0.lua:363
 Migrate = 
6x ...ags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua:20: script ran too long
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:20: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@BetterBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@BetterBags/core/events.lua"]:148: in function <BetterBags/core/events.lua:147>

Locals:
Skipped (In Encounter)

image

Cidan commented 7 months ago

Alright, I'm going to completely defer full redraws while in combat. Give me a few and I'll put out a new Alpha.

Cidan commented 7 months ago

Just a quick update, I definitely found the bug -- Blizzard fires the bag update event on zone, every time, which forces the bags to refresh. If you're in combat, it will break because drawing takes too long. I'm working around this right now.

Cidan commented 7 months ago

@raegx Latest alpha is out now -- this should fix this particular bug. Sorry about that!

Cidan commented 7 months ago

This is fixed in the latest release.