Skip to content

Lazy load settings to avoid most taint issues. - #210

Closed
Bodify wants to merge 1 commit into
funkydude:masterfrom
Bodify:master
Closed

Bodify wants to merge 1 commit into
funkydude:masterfrom
Bodify:master

Conversation

@Bodify

@Bodify Bodify commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Hey!

I was going to post an issue a while back but read through some older ones and noticed you've already responded to similar ones and that the BugSack taint error is a Blizzard issue.

This PR is a suggestion that helps work around that issue (for the most part). It creates the BugSack settings lazily so unless you open the BugSack settings you wont run into any issues, which I doubt most people do a lot of. Of course if settings have already been loaded they will still get an error but for the vast majority of people they will never run into this issue. One real fix is a combat check on Settings.OpenToCategory with a warning print to it since that is protected and currently causes errors.

In short the PR

  1. Registers the addon with Settings.RegisterAddOnCategoryon load so it is available in Blizzard settings before the BugSack settings are actually created.
  2. Hooks SettingsPanel.SetCurrentCategory to create the settings only when they're first opened.
  3. Adds combat check before opening settings to avoid error.
  4. Moved the chat print helper onto the addon table so it can be used in config.lua as well and changed the existing calls in core.lua to use it.

This fixes #206 and similar ones completely, and works around #205 and similar ones.

There's three things I am aware of that procs errors:

  1. Changing "Status Text" in WoW settings. This also causes the Status Text to disappears until a reload.
  2. Searching "nam" in WoW settings. I saw Discord socials settings being mentioned in a closed issue and they pop up with this search causing it.
  3. Attempting to open BugSack settings while in combat due to Settings.OpenToCategory being protected.

Of course, as mentioned, if someone has already opened the BugSack settings, they will still run into 1 and 2, but I still think this is a better solution to avoid the errors in nearly every normal usage scenario. Would love to see this implemented, either by this PR or from yourself. Thank you!

@funkydude

Copy link
Copy Markdown
Owner

Appreciate it, but I have no interest in trying to hack my way around the "flavour of the month" taint issues with Blizzard. If you still want to work on it then just move the config panel out of the Blizz options and onto its own decicated window similar to other addons.

@funkydude funkydude closed this Oct 3, 2026
@Bodify

Bodify commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Fair enough. I wish it was flavour of the month though, then I would agree with you. But I think this has been an issue since around Midnight release, possibly a later a patch I'm not completely sure. Either way I'm afraid it'll stick around for many more months...

Moving it to its own frame is also an option but one that I didn't feel comfortable making on someone elses addon. I felt this was a decent and simple workaround with better chances of being accepted.

For the dedicated window route I think it is nice to at least keep it registered in the Blizz options because I know many people use that to enter settings and as you mention some addons do it that way already. I could make another PR with it moved to its own frame if you are open to that but I do feel like there's some author decisions to be made there and probably just simpler for the both of us if you decided to that yourself, if you have the time of course. We'll see, lmk.

@funkydude

Copy link
Copy Markdown
Owner

Ok call it "flavour of the patch" then lol. It's had issues on/off for over a decade at this point.

But anyway, I'm open to that yeah!

@Bodify

Bodify commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

How do you feel about just having a simple button registered in Blizz settings and making the new settings just a tab on the popup like this?
image

@funkydude

Copy link
Copy Markdown
Owner

Having it as a tab in the existing popup is an interesting concept, can give it a try and see how well it's received by people.

With regards to keeping a button in the Blizz settings, I think even that alone is still going to trigger taint issues. But you can try it and see, I don't really mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BugSack' tried to call the protected function 'OpenSettingsPanel()

2 participants