From 1c581d4be3f5827e34c4459245185900d5270176 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Fri, 15 Jul 2022 19:16:48 +0200 Subject: [PATCH] fix: handle broken sigs file gracefully --- Dalamud/Game/SigScanner.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Dalamud/Game/SigScanner.cs b/Dalamud/Game/SigScanner.cs index 0ccc445f6..15a0f6116 100644 --- a/Dalamud/Game/SigScanner.cs +++ b/Dalamud/Game/SigScanner.cs @@ -532,7 +532,17 @@ namespace Dalamud.Game return; } - this.textCache = JsonConvert.DeserializeObject>(File.ReadAllText(this.cacheFile.FullName)) ?? new ConcurrentDictionary(); + try + { + this.textCache = + JsonConvert.DeserializeObject>( + File.ReadAllText(this.cacheFile.FullName)) ?? new ConcurrentDictionary(); + } + catch (Exception ex) + { + this.textCache = new ConcurrentDictionary(); + Log.Error(ex, "Couldn't load cached sigs"); + } } } }