GarbageProtector

8.4k Downloads

Thrown error on load

RosvallM opened this issue · 16 comments

commented

Version 10.0.0

On loadup.

1x FrameXML\Bindings.xml:1 Interface/AddOns/!!!GarbageProtector/GarbageProtector.lua:1 (null)

1x Interface/AddOns/!!!GarbageProtector/GarbageProtector.lua:1 (null)

commented

I can't reproduce this on Wrath Classic. I see no reason for it to happen, either. Line 1 is a comment. Blizzard should be allowing commented code.

commented

Thank you for corroborating the report! As I don't play mainline, I have a few questions for both of you. Answers to these questions may help me to understand and solve the issue.

  1. @ShadowSingularity, do you see the exact same error as @RosvallM?
  2. The rest of the questions are for both of you. What is the first line of your local copy of the GarbageProtector.lua file if you open it in a text editor?
  3. Aside from the error, what behavior of GarbageProtector is not matching your expected behavior? I'm thinking of things like the menu not appearing and seeing lag spikes from other addons' irresponsible collectgarbage calls that you previously didn't see.
  4. If you search the contents of all your addons' code files for search term collectgarbage, do you get any results? This search would be performed outside the game in your [wow]/Interface/AddOns/ directory with one of many tools. An easy way using a free tool would be to open the AddOns directory with Visual Studio Code and use the search menu, accessible with a button on the left bar.
  5. Have you been seeing similar errors with any other addons, and if so, which ones? If so, I may be able to check what their authors did to fix their addons.
commented
  1. Same errors indeed.
  2. local GarbageProtectorDBDefaults = { Enabled = true, Handlecollectgarbage = true, HandleUpdateAddOnMemoryUsage = true
  3. Before the patch it would handle the memory usage so it all showed 0mb like in elvui's system datatext which it doesnt anymore so i assume its not working correctly. Because of that the stutter when i mouseover that list of memory usage is back again.
  4. Dont have visual studio sorry, i do know elvui has an option to manually collect garbage when you mouseover the system datatext.
  5. Not that i know of.
commented

Think he means on retail, not working for me anymore either there.

commented

OK, your line 1 looks corrupted. Did you download the addon from github or somewhere else? Line 1 should be a comment, according to the master branch on github. See here for the correct line 1:

--default values for options saved between sessions

If this was just a mistake in your answer, please let me know.

commented

It is indeed that comment, thought it wasnt important since it was a comment so pasted the first 3 lines of the code instead :)

commented

It's important because the error says it manifested on line 1, which is normally impossible since line 1 is a comment. I'll have to ask some other addon developers about this one, since it doesn't make any sense to me.

commented

I see, that is indeed strange. Hope you find the culprit :) Thanks for the replies!

commented

I switched OptionsCheckButtonTemplate to InterfaceOptionsCheckButtonTemplate.

Does it work after that change, @JeremyMorton? If so, I may consider just going with that for now.

commented

I see the error:

Message: ...face/AddOns/!!!GarbageProtector/GarbageProtector.lua:56: CreateFrame(): Couldn't find inherited node "OptionsCheckButtonTemplate"
Time: Sun Oct 30 02:46:08 2022
Count: 1
Stack: ...face/AddOns/!!!GarbageProtector/GarbageProtector.lua:56: CreateFrame(): Couldn't find inherited node "OptionsCheckButtonTemplate"
[string "=[C]"]: in function `CreateFrame'
[string "@Interface/AddOns/!!!GarbageProtector/GarbageProtector.lua"]:56: in main chunk

Locals: (*temporary) = "CheckButton"
(*temporary) = "GarbageProtectorEnabledCheckButton"
(*temporary) = GarbageProtectorOptionsMenu {
 0 = <userdata>
}
(*temporary) = "OptionsCheckButtonTemplate"

This may be a different error, or the same one with more information. I switched OptionsCheckButtonTemplate to InterfaceOptionsCheckButtonTemplate.

commented
commented

OK, thanks. I'll just release with that for now and consider porting the options menu over to the new Dragonflight canvas layout when it's implemented in Classic, or the deprecated stuff is no longer available.

commented

I've made that change and pushed a new tag, so a new release should be out soon or already, depending when you see this. Would you mind trying it, @ShadowSingularity and @RosvallM?

commented

Seems to do the trick! thanks a ton!

commented

OK thanks!

commented

Sorry for the late response. Not an avid GitHub user and it's bound to an old mail.

New change works without issue, thank you. And sorry I wasn't there to answer your questions.