Skip to content

ChatGPT #20

Closed
Closed

Description

@Shandrax

If you ask ChatGPT to audit this addon, it suggests the following fixes. What do you think about it? Some issues seem to be valid after all. Note: The "fixed version" produces lua-errors on resetting the preferences, but that's apparently a minor problem with saved variables.

LuaBoost 1.9.8 — WotLK 3.3.5a audit/fix notes

Scope

Audited the supplied !LuaBoost addon for the WoW 3.3.5a (Interface 30300)
API model and patched concrete runtime/safety issues found in the Lua code.

Fixes

  1. Fixed recursive Lua error-handler wrapping.

    • The old PLAYER_LOGIN code replaced seterrorhandler(), then immediately
      queried geterrorhandler() and installed that result again.
    • That could wrap LuaBoost's own handler recursively when an error occurred.
    • The fixed code captures the pre-existing handler first and installs one
      wrapper around it.
  2. Fixed the LuaBoostC_IsLoaded fallback stub.

    • The no-DLL fallback previously returned true, which was semantically
      incorrect and could mislead other code that queried the public function.
    • The stub now returns false.
    • LuaBoost's separate stub-identity checks continue to distinguish a real
      DLL from the Lua fallback.
  3. Fixed the "MemUsage Min Interval (sec)" setting.

    • The setting existed in SavedVariables and the UI but was never used.
    • UpdateAddOnMemoryUsage() is now throttled to the configured interval when
      hard blocking is disabled.
    • The hard "Block UpdateAddOnMemoryUsage()" option still takes precedence.
    • Changing the slider now reapplies the protection hook immediately.
    • Interval 0 remains a transparent pass-through.
  4. Prevented a false-positive ThrashGuard active state.

    • ThrashGuard now reports itself active only when at least one StatusBar
      hook was actually installed.
    • The cache is not enabled when zero hooks are available.
  5. Removed the unconditional CombatText_AddMessage deduplication hook.

    • The old hook suppressed identical-looking combat-text messages for
      0.5 seconds, which could hide legitimate repeated damage/heal events.
    • It was also unconditional and had no user-facing setting.
    • Combat text is now left untouched.
  6. Updated addon version metadata to 1.9.8.

    • !LuaBoost.toc and LuaBoost.lua now report 1.9.8.
    • Localization file headers were updated to 1.9.8.

Compatibility notes

  • Interface remains 30300 for WoW 3.3.5a.
  • GetFramesRegisteredForEvent is retained; it is an old API (introduced in
    patch 2.3.0) and is appropriate for the WotLK-era API model.
  • The existing SpeedyLoad event suppression implementation was not rewritten
    because its core API usage is compatible with the target client.

Validation

  • Checked the addon file list and TOC metadata.
  • Checked for stale references to the removed CombatText hook.
  • Checked that the recursive error-handler pattern is gone.
  • Checked that the DLL fallback now reports false.
  • Checked that the memory interval setting is referenced by runtime logic.
  • Compared localization key sets; missing translated keys fall back to the
    original English key as designed.

Limitations

This environment does not contain a WoW 3.3.5a client/runtime, so the addon
could not be executed in-game here. No claim is made that this replaces a
real client-side login/combat/loading test.

Activity

  1. suprepupre commented on Oct 11, 2026

    @suprepupre
    Owner

    hello, i'll look into this tmrw

  2. suprepupre commented on Oct 11, 2026

    @suprepupre
    Owner

    Thanks for posting this, it was worth the read. I went through each point against the code instead of taking the notes at face value. Result:

    Adopted (v1.9.8):

    • MemUsage Min Interval was dead: saved and shown, never read. It now throttles UpdateAddOnMemoryUsage(). The default is 0 and an old stored value of 1 is reset once, so nobody gets the hook switched on by the upgrade.
    • ThrashGuard now reports active only when at least one StatusBar hook was installed.
    • LuaBoostC_IsLoaded() fallback returns false without the DLL. Internal detection compares function identity, so nothing changes there.
    • CombatText_AddMessage de-duplication is removed. It was worse than the notes say: each duplicate refreshed the timer, so a steady stream of identical hits or heals showed only the first one.

    Adopted with a different diagnosis:

    • The error handler is not wrapped recursively at login. It is wrapped once. The real problem is later: an addon that chains to geterrorhandler() after login nests our wrappers, and the inner one overwrites LUABOOST_LUA_ERROR_REPORT with a stack from inside the handler chain. Only the outermost wrapper writes the report now.
      Е
      The reset error: I could not reproduce it because the patched code was not attached, only the notes. In the 1.9.8 code the reset path builds a fresh DB with the new key in defaults, so the slider refresh gets a number. If you still see an error after resetting on 1.9.8, please paste the message and I will look at it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions