From ba7eb2729b8d653e5816b3b0ee89d1395b99431b Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 26 Nov 2010 15:18:20 +0100 Subject: [PATCH] Handle AbandonedMutexException in Profiler.AllThreadsWait(). --- src/AddIns/Analysis/Profiler/Controller/Profiler.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/AddIns/Analysis/Profiler/Controller/Profiler.cs b/src/AddIns/Analysis/Profiler/Controller/Profiler.cs index b033320fd7..138cf1aad2 100644 --- a/src/AddIns/Analysis/Profiler/Controller/Profiler.cs +++ b/src/AddIns/Analysis/Profiler/Controller/Profiler.cs @@ -559,7 +559,12 @@ namespace ICSharpCode.Profiler.Controller bool AllThreadsWait32() { - this.threadListMutex.WaitOne(); + try { + this.threadListMutex.WaitOne(); + } catch (AbandonedMutexException) { + // profilee crashed while holding the thread list mutex + return true; + } bool isWaiting = true;