0

I have a C# program that is acting as a update checker/launcher for a Unity Project I made. Basically it checks for updates, if there is one it downloads it then launches the program, otherwise it just launches it. Everything about it works except for the one weird bug and I can't track it down.

Occasionally it will just completely close the process that I started, no error messages, no warning. It seems to be time based, but it isn't consistent across different computers. I want to eliminate the updater as a problem before I go digging into Unity, so is there any reason that windows would just close a child process like this?

The process is started like this:

process = new Process();

process.StartInfo.FileName = Path.Combine(s, "execute.exe");

process.Start();
process.WaitForExit();

Nothing fancy, but I don't know what else to be looking for here.

Thank you!

Jacob D
  • 83
  • 6
  • What's the exit code? – ProgrammingLlama Mar 05 '21 at 07:22
  • Just checked, Exit Code 0 – Jacob D Mar 05 '21 at 07:55
  • It doesn't sound like `execute.exe` is crashing then - it sounds like it's exiting normally. Is there some logic you in it that you might not be checking for when evaluating it as a source problems? – ProgrammingLlama Mar 05 '21 at 07:56
  • Let me run it again and make sure it is actually 0, I think I was looking at this executable instead of execute.exe – Jacob D Mar 05 '21 at 08:00
  • Well, no idea what this means, but the exit code that printed was -1073740791 – Jacob D Mar 05 '21 at 08:27
  • 1
    You might want to capture the output from StandardError and also check your event viewer (Applications category) to see if anything has been logged. Alternatively add more error logging in execute.exe. – ProgrammingLlama Mar 05 '21 at 08:30
  • Okay, I will do that. Weirdest thing is that I have never been able to get execute.exe to crash when running on it's own, only when it is launched by this, which is why I wasn't sure if there was some weird windows thing that was killing the process or something. Thank you! – Jacob D Mar 05 '21 at 08:39
  • That is weird. It seems unlikely Windows is killing it by itself. It's more likely that it's failing in some way. Good luck! – ProgrammingLlama Mar 05 '21 at 08:48

0 Answers0