From 3cddcfca1c018f96489b8ed5a1b41ad9955c9a32 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Jan 2026 21:04:23 +0000 Subject: [PATCH 1/2] Initial plan From 98b7a9ab954023c4b7481298069f9d6e1c6198c3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Jan 2026 21:06:41 +0000 Subject: [PATCH 2/2] Wrap GetAllDescendantProcessesWmi call in try-catch to prevent crashes Co-authored-by: andrew-polk <5847219+andrew-polk@users.noreply.github.com> --- src/BloomExe/Utils/PerformanceMeasurement.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/BloomExe/Utils/PerformanceMeasurement.cs b/src/BloomExe/Utils/PerformanceMeasurement.cs index 114b2217b5e0..b2118208fe2a 100644 --- a/src/BloomExe/Utils/PerformanceMeasurement.cs +++ b/src/BloomExe/Utils/PerformanceMeasurement.cs @@ -382,7 +382,16 @@ private static List 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(); } private static List GetAllDescendantProcessesWindows(int parentPid)