From 2df8a7b96d293bc94205dd4dc992922b1c303595 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Fri, 20 Mar 2026 21:16:58 -0500 Subject: [PATCH] fix: v1.4.4 - AceGUI pool fixes, event handling nil checks, QuestieLearner serialization, l10n format fixes --- CHANGELOG.md | 24 ++ Compat/Libs/AceGUI-3.0/AceGUI-3.0.lua | 24 +- Compat/embeds.xml | 29 +- .../AceConfigDialog-3.0.lua | 18 +- Libs/AceGUI-3.0/AceGUI-3.0.lua | 25 +- .../widgets/AceGUIContainer-ScrollFrame.lua | 7 +- .../widgets/AceGUIContainer-TreeGroup.lua | 7 +- .../widgets/AceGUIWidget-ColorPicker.lua | 7 +- .../widgets/AceGUIWidget-DropDown-Items.lua | 7 +- Libs/AceSerializer-3.0/AceSerializer-3.0.lua | 270 ++++++++++++++++++ Libs/AceSerializer-3.0/AceSerializer-3.0.xml | 3 + .../Translations/Journey/MyJourney.lua | 48 ++-- Localization/l10n.lua | 9 + Modules/Journey/QuestieJourneyPrivates.lua | 1 + Modules/Network/QuestieLearnerComms.lua | 40 ++- Modules/QuestieCompat.lua | 50 +++- Modules/QuestieDebugOffer.lua | 19 +- Modules/QuestieEventHandler.lua | 1 + Modules/QuestiePlayer.lua | 1 + Modules/Tooltips/MapIconTooltip.lua | 16 +- Questie-X-Classic.toc | 4 +- Questie-X-TBC.toc | 4 +- Questie-X-Turtle.toc | 4 +- Questie-X.toc | 2 +- README.md | 2 +- docs/changelog.html | 30 ++ 26 files changed, 569 insertions(+), 83 deletions(-) create mode 100644 Libs/AceSerializer-3.0/AceSerializer-3.0.lua create mode 100644 Libs/AceSerializer-3.0/AceSerializer-3.0.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 364f53a..6d23e8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## v1.4.4 — AceGUI Pool & Event Handling Fixes + +- **[AceGUI Fix]** Fixed `Compat/embeds.xml` to load Wrath-compatible Ace library versions from `Libs/` (AceGUI-3.0 v34, AceConfigDialog-3.0 v66) instead of newer versions from `..\Libs/` that caused widget pool corruption. +- **[AceGUI Fix]** Added nil checks throughout AceGUI-3.0 (`Create`, `Release`, `WidgetBase.Fire`, `WidgetContainerBase` methods) to prevent crashes when pooled widgets have corrupted/nil properties. +- **[AceGUI Fix]** Added content nil checks to layout functions (List, Flow, Fill, Table) to prevent crashes when `content` is nil during layout. +- **[AceGUI Fix]** Applied same nil check fixes to `Compat/Libs/AceGUI-3.0/AceGUI-3.0.lua` for consistency. +- **[Event Fix]** Added nil check for `message` parameter in `QuestieEventHandler:ChatMsgSystem` to prevent "bad argument #1 to 'find'" errors. +- **[Event Fix]** Added nil check for `level` parameter in `QuestiePlayer:SetPlayerLevel` to prevent "number expected, got nil" errors. +- **[QuestieLearner Fix]** Added `SanitizeData` function with depth limiting and proper key/value filtering to remove functions, userdata, and thread values from learned data before network serialization. +- **[QuestieLearner Fix]** Added pcall wrapper around AceSerializer:Serialize to catch and log any remaining serialization errors instead of crashing. +- **[QuestieLearner Fix]** Added early return checks in `BroadcastLearnedData` when data is nil or sanitization produces empty results. +- **[Journey Fix]** Added nil check for `container` in `HandleTabChange` to prevent "attempt to index local 'container'" errors. +- **[l10n Fix]** Added type check for `translationValue` in l10n:translate to prevent "bad argument #2 to 'format'" errors when translation is not a string or when format arguments are missing. + +## v1.4.3 — Taint & API Compatibility Fixes + +- **[Taint Fix]** Deferred SetItemRef hook execution using C_Timer.After to avoid tainting protected execution contexts. +- **[Taint Fix]** Removed redundant `_G = _G or {}` from WotLKDB data file that could contribute to namespace pollution. +- **[Taint Fix]** Moved xpcall polyfill from bare `_G.xpcall` to `QuestieCompat.xpcall` namespace to prevent polluting the global table. +- **[API Fix]** Added polyfills for `GetCurrentRegion` and `GetCurrentRegionName` for AceDB-3.0 compatibility on WotLK/Classic. +- **[API Fix]** Added polyfills for `Ambiguate` and `RegisterAddonMessagePrefix` for AceComm-3.0 compatibility on WotLK/Classic. +- **[API Fix]** Added conditional check for `DialogBorderOpaqueTemplate` and `SetFixedFrameStrata` in AceConfigDialog for WotLK/Classic. +- **[AceGUI Fix]** Added WotLK-compatible fallback for `SetColorTexture` using `SetTexture` + `SetVertexColor`. + ## v1.4.2 — Quest Route Optimization - **[Feature]** Added Quest Route Optimization with three modes: Single Quest, All Tracked Quests, and TSP Approximation. diff --git a/Compat/Libs/AceGUI-3.0/AceGUI-3.0.lua b/Compat/Libs/AceGUI-3.0/AceGUI-3.0.lua index 9853644..d3d4d81 100644 --- a/Compat/Libs/AceGUI-3.0/AceGUI-3.0.lua +++ b/Compat/Libs/AceGUI-3.0/AceGUI-3.0.lua @@ -172,6 +172,8 @@ end function AceGUI:Create(type) if WidgetRegistry[type] then local widget = newWidget(type) + + if not widget then return end if rawget(widget, "Acquire") then widget.OnAcquire = widget.Acquire @@ -204,6 +206,7 @@ end -- If this widget is a Container-Widget, all of its Child-Widgets will be releases as well. -- @param widget The widget to release function AceGUI:Release(widget) + if not widget then return end safecall(widget.PauseLayout, widget) widget:Fire("OnRelease") safecall(widget.ReleaseChildren, widget) @@ -310,6 +313,7 @@ do end WidgetBase.Fire = function(self, name, ...) + if not self or not self.type or not self.events then return end if self.events[name] then local success, ret = safecall(self.events[name], self, name, ...) if success then @@ -422,14 +426,19 @@ do local WidgetContainerBase = AceGUI.WidgetContainerBase WidgetContainerBase.PauseLayout = function(self) - self.LayoutPaused = true + if self then + self.LayoutPaused = true + end end WidgetContainerBase.ResumeLayout = function(self) - self.LayoutPaused = nil + if self then + self.LayoutPaused = nil + end end WidgetContainerBase.PerformLayout = function(self) + if not self then return end if self.LayoutPaused then return end @@ -438,7 +447,9 @@ do --call this function to layout, makes sure layed out objects get a frame to get sizes etc WidgetContainerBase.DoLayout = function(self) - self:PerformLayout() + if self then + self:PerformLayout() + end -- if not self.parent then -- self.frame:SetScript("OnUpdate", LayoutOnUpdate) -- end @@ -481,7 +492,9 @@ do end WidgetContainerBase.SetLayout = function(self, Layout) - self.LayoutFunc = AceGUI:GetLayout(Layout) + if self then + self.LayoutFunc = AceGUI:GetLayout(Layout) + end end WidgetContainerBase.SetAutoAdjustHeight = function(self, adjust) @@ -627,6 +640,7 @@ end -- Very simple Layout, Children are stacked on top of each other down the left side AceGUI:RegisterLayout("List", function(content, children) + if not content then return end local height = 0 local width = content.width or content:GetWidth() or 0 for i = 1, #children do @@ -664,6 +678,7 @@ AceGUI:RegisterLayout("List", -- A single control fills the whole content area AceGUI:RegisterLayout("Fill", function(content, children) + if not content then return end if children[1] then children[1]:SetWidth(content:GetWidth() or 0) children[1]:SetHeight(content:GetHeight() or 0) @@ -683,6 +698,7 @@ end AceGUI:RegisterLayout("Flow", function(content, children) if layoutrecursionblock then return end + if not content then return end --used height so far local height = 0 --width used in the current row diff --git a/Compat/embeds.xml b/Compat/embeds.xml index be2941b..d751a44 100644 --- a/Compat/embeds.xml +++ b/Compat/embeds.xml @@ -1,29 +1,30 @@