Licensee reports buffer deadlock issue in System/BuildHostPlatform.cs (lines 283-329). Moving Proc.WaitForExit() to after the for-loop seems to resolve the issue for them.
public override ProcessInfo[] GetProcesses() { List<ProcessInfo> Result = new List<ProcessInfo>(); ProcessStartInfo StartInfo = new ProcessStartInfo(); StartInfo.FileName = "ps"; StartInfo.Arguments = "-eaw -o pid,comm"; StartInfo.CreateNoWindow = true; StartInfo.UseShellExecute = false; StartInfo.RedirectStandardOutput = true; Process Proc = new Process(); Proc.StartInfo = StartInfo; try { Proc.Start(); Proc.WaitForExit(); // Licensee moved this to _after_ the for-loop. for (string Line = Proc.StandardOutput.ReadLine(); Line != null; Line = Proc.StandardOutput.ReadLine()) { Line = Line.Trim(); int PIDEnd = Line.IndexOf(' '); string PIDString = Line.Substring(0, PIDEnd); if (PIDString != "PID") { string Filename = Line.Substring(PIDEnd + 1); int Pid = Int32.Parse(PIDString); try { Process ExistingProc = Process.GetProcessById(Pid); if (ExistingProc != null && Pid != Process.GetCurrentProcess().Id && ExistingProc.HasExited == false) { ProcessInfo ProcInfo = new ProcessInfo(ExistingProc.Id, Path.GetFileName(Filename), Filename); Result.Add(ProcInfo); } } catch { } } } }
Unknown
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-114162 in the post.
0 |
Component | UE - Foundation - Cpp Tools |
---|---|
Affects Versions | 4.26.2 |
Target Fix | 4.27 |
Created | Apr 22, 2021 |
---|---|
Resolved | Apr 27, 2021 |
Updated | Nov 30, 2022 |