From 728066d0672fc3535bfb2f1785f055c650559b75 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Tue, 9 Jun 2026 20:48:07 -0500 Subject: [PATCH] fix(libs): degrade gracefully on over-long AceComm prefix (#12) A third-party addon (e.g. AtlasLoot) registers an AceComm prefix longer than the client's 16-character limit. Because Questie's bundled AceComm is the LibStub winner and its xpcall polyfill wraps AceAddon's OnEnable, the upstream hard error() in RegisterComm surfaced as a recurring Lua error at every login (seen on ChromieCraft). The prefix can never work on the client regardless, so RegisterComm now warns once and skips the registration for over-long prefixes instead of throwing, leaving the calling addon's OnEnable intact and removing the error popup. --- CHANGELOG.md | 1 + Libs/AceComm-3.0/AceComm-3.0.lua | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d3456c..2d3fe31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ ### Bug Fixes +- **[Libs/AceComm - Long Comm Prefix Login Error]** (#12) Fixed a recurring login Lua error `AceComm:RegisterComm(...): prefix length is limited to 16 characters` on servers like ChromieCraft. The cause is a third-party addon (e.g. AtlasLoot) registering an AceComm prefix longer than the client's 16-character limit; because Questie's bundled AceComm is the LibStub winner and its `xpcall` polyfill wraps AceAddon's `OnEnable`, the upstream hard `error()` surfaced through Questie's frames every login. Our bundled `AceComm:RegisterComm` now degrades gracefully for over-long prefixes (which can never work on the client anyway): it warns once and skips the registration instead of throwing, so the offending addon's `OnEnable` is no longer aborted and the error popup is gone. - **[Tracker - VoiceOver questPlayButtons Nil Crash]** (#15) Fixed `attempt to index field 'questPlayButtons' (a nil value)` in `TrackerUtils:UpdateVoiceOverPlayButtons` and `TrackerLinePool.SetAllPlayButtonAlpha`. `TrackerUtils:IsVoiceOverLoaded` only checked that the VoiceOver addons were loaded, but some VoiceOver builds (seen on Elune) expose a `QuestOverlayUI` without a `questPlayButtons` table. It now also verifies `VoiceOver.QuestOverlayUI.questPlayButtons` exists; since every play-button call site gates on this function, the integration is now safely skipped instead of crashing on those builds. - **[Libs/AceGUI - Tree Tooltip Nil Crash]** (#15) Hardened `AceGUIContainer-TreeGroup` against `attempt to index ... 'tooltip' (a nil value)` when a conflicting addon registers a broken `AceGUI-3.0` core (observed in the wild as version `1.#INF`) that wins LibStub but never creates the shared `AceGUI.tooltip` frame. The tree button enter/leave handlers now lazily (re)create the tooltip frame; the widget version was bumped 47→48 so the fixed widget wins registration over an unpatched same-version copy. - **[Tooltip - Learner Spawn Data Never In Main Tooltip]** Learner spawn/kill data is no longer added inline to the main NPC tooltip under any setting. Previously, with the "Use secondary learner tooltip" option off, `_AddLearnedSpawnTooltipLine` appended the lines directly to `GameTooltip`. The toggle now gates the data entirely: on = shown in the separate secondary frame, off = not shown anywhere. Removed the now-unused `_AddTooltipSeparator` helper and updated the option description. (Complements the earlier System A suppression that kept the duplicate learner lines out of the main tooltip.) diff --git a/Libs/AceComm-3.0/AceComm-3.0.lua b/Libs/AceComm-3.0/AceComm-3.0.lua index 3fe4a61..c4f57c9 100644 --- a/Libs/AceComm-3.0/AceComm-3.0.lua +++ b/Libs/AceComm-3.0/AceComm-3.0.lua @@ -53,13 +53,27 @@ AceComm.multipart_spool = AceComm.multipart_spool or {} --- Register for Addon Traffic on a specified prefix -- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent), max 16 characters -- @param method Callback to call on message reception: Function reference, or method name (string) to call on self. Defaults to "OnCommReceived" +local _warnedLongPrefix = {} + function AceComm:RegisterComm(prefix, method) if method == nil then method = "OnCommReceived" end - if #prefix > 16 then -- TODO: 15? - error("AceComm:RegisterComm(prefix,method): prefix length is limited to 16 characters") + if #prefix > 16 then -- 16 char limit imposed by the client (RegisterAddonMessagePrefix) + -- Some third-party addons (e.g. AtlasLoot) call RegisterComm with a prefix longer + -- than the client's 16-character limit. Upstream AceComm hard-errors here, which -- + -- because this is the LibStub-winning AceComm and Questie's xpcall polyfill wraps + -- AceAddon's OnEnable -- surfaces as a recurring Lua error at every login. The prefix + -- can never work on this client regardless, so degrade gracefully: warn once and skip + -- the registration instead of aborting the calling addon's OnEnable. + if not _warnedLongPrefix[prefix] then + _warnedLongPrefix[prefix] = true + if DEFAULT_CHAT_FRAME then + DEFAULT_CHAT_FRAME:AddMessage("|cffff8000AceComm:|r ignoring comm prefix longer than 16 characters: '" .. tostring(prefix) .. "'") + end + end + return end if C_ChatInfo then C_ChatInfo.RegisterAddonMessagePrefix(prefix)