diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index ceda01f73..070903c0c 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -73,7 +73,7 @@ body:
label: Version
description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu.
options:
- - v1.1.18.0 (Treacherous Tides)
+ - v1.1.18.1 (Treacherous Tides)
- Other
validations:
required: true
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Screens/CampaignSetupUI/SinglePlayerCampaignSetupUI.cs b/Barotrauma/BarotraumaClient/ClientSource/Screens/CampaignSetupUI/SinglePlayerCampaignSetupUI.cs
index 6f51a78d9..8400fab7d 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Screens/CampaignSetupUI/SinglePlayerCampaignSetupUI.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Screens/CampaignSetupUI/SinglePlayerCampaignSetupUI.cs
@@ -583,7 +583,9 @@ namespace Barotrauma
if (saveFiles == null)
{
- saveFiles = SaveUtil.GetSaveFiles(SaveUtil.SaveType.Singleplayer);
+ //we don't need to log errors at this point,
+ //if any file fails to load the error will get logged when we try to extract the root from the game session doc later in the method
+ saveFiles = SaveUtil.GetSaveFiles(SaveUtil.SaveType.Singleplayer, logLoadErrors: false);
}
var leftColumn = new GUILayoutGroup(new RectTransform(new Vector2(0.5f, 1.0f), loadGameContainer.RectTransform), childAnchor: Anchor.TopCenter)
diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj
index 27f6da423..33cb1429b 100644
--- a/Barotrauma/BarotraumaClient/LinuxClient.csproj
+++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 1.1.18.0
+ 1.1.18.1
Copyright © FakeFish 2018-2023
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj
index 734cf74d5..fe6c77de0 100644
--- a/Barotrauma/BarotraumaClient/MacClient.csproj
+++ b/Barotrauma/BarotraumaClient/MacClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 1.1.18.0
+ 1.1.18.1
Copyright © FakeFish 2018-2023
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj
index da0de2f24..e3b4fd949 100644
--- a/Barotrauma/BarotraumaClient/WindowsClient.csproj
+++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 1.1.18.0
+ 1.1.18.1
Copyright © FakeFish 2018-2023
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj
index 6fab2b832..442852626 100644
--- a/Barotrauma/BarotraumaServer/LinuxServer.csproj
+++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 1.1.18.0
+ 1.1.18.1
Copyright © FakeFish 2018-2023
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj
index 92c242778..2f601d912 100644
--- a/Barotrauma/BarotraumaServer/MacServer.csproj
+++ b/Barotrauma/BarotraumaServer/MacServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 1.1.18.0
+ 1.1.18.1
Copyright © FakeFish 2018-2023
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj
index 63dc11a9e..d324037b4 100644
--- a/Barotrauma/BarotraumaServer/WindowsServer.csproj
+++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 1.1.18.0
+ 1.1.18.1
Copyright © FakeFish 2018-2023
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Utils/SaveUtil.cs b/Barotrauma/BarotraumaShared/SharedSource/Utils/SaveUtil.cs
index dc80cf2f3..7d2a8d983 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Utils/SaveUtil.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Utils/SaveUtil.cs
@@ -238,7 +238,7 @@ namespace Barotrauma
return folder;
}
- public static IReadOnlyList GetSaveFiles(SaveType saveType, bool includeInCompatible = true)
+ public static IReadOnlyList GetSaveFiles(SaveType saveType, bool includeInCompatible = true, bool logLoadErrors = true)
{
string defaultFolder = saveType == SaveType.Singleplayer ? DefaultSaveFolder : DefaultMultiplayerSaveFolder;
if (!Directory.Exists(defaultFolder))
@@ -273,7 +273,7 @@ namespace Barotrauma
List saveInfos = new List();
foreach (string file in files)
{
- var docRoot = ExtractGameSessionRootElementFromSaveFile(file);
+ var docRoot = ExtractGameSessionRootElementFromSaveFile(file, logLoadErrors);
if (!includeInCompatible && !IsSaveFileCompatible(docRoot))
{
continue;
@@ -561,7 +561,7 @@ namespace Barotrauma
/// Extract *only* the root element of the gamesession.xml file in the given save.
/// For performance reasons, none of its child elements are returned.
///
- public static XElement? ExtractGameSessionRootElementFromSaveFile(string savePath)
+ public static XElement? ExtractGameSessionRootElementFromSaveFile(string savePath, bool logLoadErrors = true)
{
const int maxRetries = 4;
for (int i = 0; i <= maxRetries; i++)
@@ -617,12 +617,19 @@ namespace Barotrauma
if (i >= maxRetries || !File.Exists(savePath)) { throw; }
DebugConsole.NewMessage(
- $"Failed to decompress file \"{savePath}\" for root extraction {{{e.Message}}}, retrying in 250 ms...",
+ $"Failed to decompress file \"{savePath}\" for root extraction ({e.Message}), retrying in 250 ms...",
Color.Red);
Thread.Sleep(250);
}
+ catch (System.IO.InvalidDataException e)
+ {
+ if (logLoadErrors)
+ {
+ DebugConsole.ThrowError($"Failed to decompress file \"{savePath}\" for root extraction.", e);
+ }
+ return null;
+ }
}
-
return null;
}
diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt
index 9f2713a8f..4210b90eb 100644
--- a/Barotrauma/BarotraumaShared/changelog.txt
+++ b/Barotrauma/BarotraumaShared/changelog.txt
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------------------------------------------------------------------------------------
+v1.1.18.1
+-------------------------------------------------------------------------------------------------------------------------------------------------
+
+- Fixed opening the "load game" menu crashing the game if you have any corrupted/unloadable saves in the save folder. In multiplayer, this would just prevent opening the campaign setup menu without any error messages.
+
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.1.18.0
-------------------------------------------------------------------------------------------------------------------------------------------------