From 47bae57d75f582f446583d136b93907d66394411 Mon Sep 17 00:00:00 2001 From: goat Date: Sat, 1 Feb 2020 20:02:29 +0900 Subject: [PATCH] fix: add a sleep before injecting to try to alleviate the STATUS_INTERNAL_ERROR issues --- Dalamud.Injector/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dalamud.Injector/Program.cs b/Dalamud.Injector/Program.cs index 8610ac7c2..5db47c2dd 100644 --- a/Dalamud.Injector/Program.cs +++ b/Dalamud.Injector/Program.cs @@ -18,7 +18,7 @@ namespace Dalamud.Injector { { File.WriteAllText("InjectorException.txt", eventArgs.ExceptionObject.ToString()); - MessageBox.Show("Failed to inject the XIVLauncher in-game addon. Please report this error:\n\n" + eventArgs.ExceptionObject, "XIVLauncher Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("Failed to inject the XIVLauncher in-game addon.\nPlease try restarting your game and your PC.\nIf this keeps happening, please report this error.", "XIVLauncher Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Environment.Exit(0); }; @@ -45,6 +45,9 @@ namespace Dalamud.Injector { var startInfo = JsonConvert.DeserializeObject(Encoding.UTF8.GetString(Convert.FromBase64String(args[1]))); startInfo.WorkingDirectory = Directory.GetCurrentDirectory(); + // Seems to help with the STATUS_INTERNAL_ERROR condition + Thread.Sleep(1000); + // Inject to process Inject(process, startInfo); }