Glass

Glass

73.6k Downloads

Large amount of print calls in short time causes issues

Grimonja opened this issue ยท 3 comments

commented

Describe the bug
As title said.

To Reproduce
Running this code causes this to happen:

for i=1,100 do
print(123)
end

1280x ...ddOns\Glass\Glass\Components\SlidingMessageFrame.lua:401: Action[SetPoint] failed because[SetPoint would result in anchor family connection]: attempted from: :SetPoint.
[string "=[C]"]: in function SetPoint' [string "@Glass\Glass\Components\SlidingMessageFrame.lua"]:401: in function CreateMessageFrame'
[string "@glass\Glass\Components\SlidingMessageFrame.lua"]:436: in function Update' [string "@Glass\Glass\Components\SlidingMessageFrame.lua"]:425: in function OnUpdate'
[string "@glass\Glass\Components\SlidingMessageFrame.lua"]:230: in function <...ddOns\Glass\Glass\Components\SlidingMessageFrame.lua:229>

commented

Hey @Grimonja. Thanks for this. Unfortunately I don't think this is a supported use case as it doesn't happen in real-world use.

commented

Hey @mixxorz,

I don't agree. There are quite a few snippets out there that casual person might run to display some data. I recall there was a snippet that displayed quest completion. Combine that with spamming trade chat. And it might happen.

Not to mention its extremely annoying in development purposes when you just want to quickly print arguments of a frequently frying event. Or by just using /dump on a sufficiently large table.

I honestly don't think chat addon should interfere with this.

commented

Hey. Thanks for the context.

I think I mentioned this before, but for addon development, you ought to really be using ViragDevTool for debugging. It lets you "print" tables and lets you inspect them. I suspect this will also save you from having to print out 100 lines in quick succession.

Also, I think that code snippet might be a bit extreme. Glass can handle even the spammiest of Trade Chats, but I don't think it's reasonable to expect Glass to handle creating 100 frames in an instant. In fact, I expect that this might be a limitation of WoW's UI.

Nevertheless, this feels like an extreme edge case that not a lot of people are running in to, and will probably not be prioritized any time soon.

That being said, I am working updates to how messages are added to the frame. This might be inadvertently fixed by that. I'll circle back here once that gets merged.

Also, Glass is open-source so if you feel that this is really important, I'd be happy to merge in a pull request.