From 21ec6655aa62a849936f74111f2531cd993f986e Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 12 Dec 2008 23:15:24 +0000 Subject: [PATCH] Ignore exceptions during shutdown after a debugger error (e.g. trying to debug 64-bit process) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3678 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Internal/ManagedCallback.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs index d9daa22e2c..4b2cab3866 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs @@ -271,13 +271,20 @@ namespace Debugger string errorText = String.Format("Debugger error: \nHR = 0x{0:X} \nCode = 0x{1:X}", errorHR, errorCode); if ((uint)errorHR == 0x80131C30) { - errorText += "\n\nIf you are running a 64-bit system this setting might help:\nProject -> Project Options -> Compiling -> Target CPU = 32-bit Intel"; + errorText += "\n\nDebugging 64-bit processes is currently not supported.\n" + + "If you are running a 64-bit system, this setting might help:\n" + + "Project -> Project Options -> Compiling -> Target CPU = 32-bit Intel"; } System.Windows.Forms.MessageBox.Show(errorText); - pauseOnNextExit = true; - ExitCallback(); + try { + pauseOnNextExit = true; + ExitCallback(); + } catch (COMException) { + } catch (InvalidComObjectException) { + // ignore errors during shutdown after debugger error + } } public void UpdateModuleSymbols(ICorDebugAppDomain pAppDomain, ICorDebugModule pModule, IStream pSymbolStream)