diff --git a/Config/ConfigurationManager.cs b/Config/ConfigurationManager.cs
index f871615..b1b504b 100644
--- a/Config/ConfigurationManager.cs
+++ b/Config/ConfigurationManager.cs
@@ -373,7 +373,6 @@ namespace HSUI.Config
if (!IsFreshInstall())
{
LoadConfigurations();
-
// gotta save after initial load store possible version update changes right away
SaveConfigurations(true);
}
diff --git a/HSUI.csproj b/HSUI.csproj
index 42e0846..fe80e61 100644
--- a/HSUI.csproj
+++ b/HSUI.csproj
@@ -9,9 +9,9 @@
HSUI
- 1.0.2.1
- 1.0.2.1
- 1.0.2.1
+ 1.0.2.2
+ 1.0.2.2
+ 1.0.2.2
diff --git a/HSUI.json b/HSUI.json
index 55578e7..a0d7140 100644
--- a/HSUI.json
+++ b/HSUI.json
@@ -2,7 +2,7 @@
"Author": "Knack117",
"Name": "HSUI",
"InternalName": "HSUI",
- "AssemblyVersion": "1.0.2.1",
+ "AssemblyVersion": "1.0.2.2",
"Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.",
"ApplicableVersion": "any",
"RepoUrl": "https://github.com/Knack117/HSUI",
diff --git a/Helpers/ColorUtils.cs b/Helpers/ColorUtils.cs
index 182ac7b..36376bf 100644
--- a/Helpers/ColorUtils.cs
+++ b/Helpers/ColorUtils.cs
@@ -47,6 +47,12 @@ namespace HSUI.Helpers
//min and max are used for color thresholds. for instance return colorLeft if i < min or return ColorRight if i > max
public static PluginConfigColor GetColorByScale(float i, float min, float max, PluginConfigColor colorLeft, PluginConfigColor colorRight, PluginConfigColor colorMax, bool useMaxColor, BlendMode blendMode)
{
+ try
+ {
+ // Guard against null/invalid config (can happen with corrupted or migrated config)
+ if (colorLeft == null || colorRight == null || colorMax == null)
+ return PluginConfigColor.FromHex(0xFF808080);
+
//Set our thresholds where the ratio is the range of values we will use for interpolation.
//Values outside this range will either return colorLeft or colorRight
float ratio = i;
@@ -63,7 +69,8 @@ namespace HSUI.Helpers
else
{
float range = max - min;
- ratio = (i - min) / range;
+ if (MathF.Abs(range) < 0.0001f) ratio = 1; // avoid divide-by-zero when min==max
+ else ratio = (i - min) / range;
}
}
@@ -224,6 +231,12 @@ namespace HSUI.Helpers
}
}
return new(Vector4.One);
+ }
+ catch (Exception ex)
+ {
+ Plugin.Logger.Warning($"[HSUI] GetColorByScale failed (config may be corrupted): {ex.Message}");
+ return PluginConfigColor.FromHex(0xFF808080);
+ }
}
public static PluginConfigColor ColorForActor(IGameObject? actor)
diff --git a/changelog.md b/changelog.md
index b3033bb..3779faf 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,6 @@
+# 1.0.2.2
+- **Critical fix**: ColorUtils.GetColorByScale was throwing (corrupted config or divide-by-zero), causing Party Frames to crash the draw loop and preventing Hotbars and later elements from rendering. Added null checks, divide-by-zero guard, and try-catch fallback.
+
# 1.0.2.1
- **Release fix**: Include all required files in release zip (Assets, Colourful, Newtonsoft.Json, SixLabors.ImageSharp). Fixes hotbars and other features not working when installed from release vs dev plugin.
diff --git a/pluginmaster.json b/pluginmaster.json
index fe7dafe..6e7c66b 100644
--- a/pluginmaster.json
+++ b/pluginmaster.json
@@ -4,9 +4,9 @@
"Name": "HSUI",
"Punchline": "A modern HUD replacement built for customization.",
"Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.",
- "Changelog": "Hotfix: Complete release zip (Assets, DLLs). Restore Hotbar Layout, config right-click fix.",
+ "Changelog": "Fix: ColorUtils crash that prevented hotbars from showing. Null/divide-by-zero guards in GetColorByScale.",
"InternalName": "HSUI",
- "AssemblyVersion": "1.0.2.1",
+ "AssemblyVersion": "1.0.2.2",
"RepoUrl": "https://github.com/Knack117/HSUI",
"ApplicableVersion": "any",
"Tags": ["UI", "HUD", "Unit Frames", "Nameplates", "Party Frames", "Hotbars"],
@@ -14,10 +14,10 @@
"DalamudApiLevel": 14,
"IconUrl": "https://raw.githubusercontent.com/Knack117/HSUI/main/Media/Images/icon.png",
"ImageUrls": [],
- "DownloadLinkInstall": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.0/latest.zip",
+ "DownloadLinkInstall": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.2/latest.zip",
"IsHide": false,
"IsTestingExclusive": false,
- "DownloadLinkTesting": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.1/latest.zip",
- "DownloadLinkUpdate": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.1/latest.zip"
+ "DownloadLinkTesting": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.2/latest.zip",
+ "DownloadLinkUpdate": "https://github.com/Knack117/HSUI/releases/download/v1.0.2.2/latest.zip"
}
]