(d9567758c) Added MD5 hash of the executable and whether SteamManager has been initialized to crash reports
This commit is contained in:
@@ -171,6 +171,21 @@ namespace Barotrauma
|
|||||||
|
|
||||||
DebugConsole.DequeueMessages();
|
DebugConsole.DequeueMessages();
|
||||||
|
|
||||||
|
string exePath = System.Reflection.Assembly.GetEntryAssembly().Location;
|
||||||
|
var md5 = System.Security.Cryptography.MD5.Create();
|
||||||
|
Md5Hash exeHash = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (var stream = File.OpenRead(exePath))
|
||||||
|
{
|
||||||
|
exeHash = new Md5Hash(stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
//gotta catch them all, we don't want to throw an exception while writing a crash report
|
||||||
|
}
|
||||||
|
|
||||||
StreamWriter sw = new StreamWriter(filePath);
|
StreamWriter sw = new StreamWriter(filePath);
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@@ -178,6 +193,11 @@ namespace Barotrauma
|
|||||||
sb.AppendLine("\n");
|
sb.AppendLine("\n");
|
||||||
sb.AppendLine("Barotrauma seems to have crashed. Sorry for the inconvenience! ");
|
sb.AppendLine("Barotrauma seems to have crashed. Sorry for the inconvenience! ");
|
||||||
sb.AppendLine("\n");
|
sb.AppendLine("\n");
|
||||||
|
if (exeHash?.Hash != null)
|
||||||
|
{
|
||||||
|
sb.AppendLine(exeHash.Hash);
|
||||||
|
}
|
||||||
|
sb.AppendLine("\n");
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
sb.AppendLine("Game version " + GameMain.Version + " (debug build)");
|
sb.AppendLine("Game version " + GameMain.Version + " (debug build)");
|
||||||
#else
|
#else
|
||||||
@@ -194,6 +214,10 @@ namespace Barotrauma
|
|||||||
sb.AppendLine("Level seed: " + ((Level.Loaded == null) ? "no level loaded" : Level.Loaded.Seed));
|
sb.AppendLine("Level seed: " + ((Level.Loaded == null) ? "no level loaded" : Level.Loaded.Seed));
|
||||||
sb.AppendLine("Loaded submarine: " + ((Submarine.MainSub == null) ? "None" : Submarine.MainSub.Name + " (" + Submarine.MainSub.MD5Hash + ")"));
|
sb.AppendLine("Loaded submarine: " + ((Submarine.MainSub == null) ? "None" : Submarine.MainSub.Name + " (" + Submarine.MainSub.MD5Hash + ")"));
|
||||||
sb.AppendLine("Selected screen: " + (Screen.Selected == null ? "None" : Screen.Selected.ToString()));
|
sb.AppendLine("Selected screen: " + (Screen.Selected == null ? "None" : Screen.Selected.ToString()));
|
||||||
|
if (SteamManager.IsInitialized)
|
||||||
|
{
|
||||||
|
sb.AppendLine("SteamManager initialized");
|
||||||
|
}
|
||||||
|
|
||||||
if (GameMain.Client != null)
|
if (GameMain.Client != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user