Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/BloomExe/Utils/PerformanceMeasurement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,16 @@ private static List<Process> GetAllDescendantProcesses(Process parent)
// If the fast Windows approach fails for any reason, fall back to WMI below.
}

return GetAllDescendantProcessesWmi(parent.Id);
try
{
return GetAllDescendantProcessesWmi(parent.Id);
}
catch
{
// If WMI fails, return empty list. We don't want performance monitoring to crash the application.
}

return new List<Process>();
}

private static List<Process> GetAllDescendantProcessesWindows(int parentPid)
Expand Down