当我调试在设计模式下以某种形式打开的项目时,Visual Studio崩溃. [英] Visual Studio crashes when I debug a project with a certain form open in design mode..."Catastrophic failure"

查看:51
本文介绍了当我调试在设计模式下以某种形式打开的项目时,Visual Studio崩溃.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,每当打开某种形式的调试项目时,VS2008就会不断崩溃.我附加了另一个VS2008实例,发现以下异常是罪魁祸首:

As the title says, VS2008 keeps crashing on me whenever I debug a project when a certain form is open. I attached another VS2008 instance to it and found the following exception to be the culprit:

System.Runtime.InteropServices.COMException occurred
  Message="Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))"
  Source="mscorlib"
  ErrorCode=-2147418113
  StackTrace:
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       at Microsoft.VisualStudio.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
  InnerException: 

我遇到的问题是我不知道为什么会发生这种情况.我们使用了一些COM组件(这是我正在更新的软件的旧版本),但是当程序实际运行或正常查看设计视图时,它们不会引起任何异常.仅当我打开窗体时调试时.在VS崩溃后进行调试时,程序本身运行良好,但是Visual Studio本身已崩溃.

The problem I'm having is that I have no idea why this would happen. We use a few COM components (this is an old version of software I'm updating), but they don't cause any exceptions when the program is actually running, or when viewing design view normally. Only when I debug when the form is open. The program itself runs fine when debugging after VS's crash, but Visual Studio itself is hosed.

我知道最简单的答案是确保表单已关闭!"但是加载会花费很多时间,而且保持打开状态的流程更加流畅(而且,我并不总是记得关闭它!)

I know the simplest answer is to "make sure that form is closed!" but it takes forever to load and it's a much smoother workflow to keep it open (plus, I don't always remember to close it!)

那么,有人碰到这个吗?有谁知道为什么会发生这种情况?

So, has anyone run into this? Does anyone have any ideas why this might be happening?

推荐答案

您可以尝试通过命令行刷新" IDE安装:

You could try to 'refresh' you IDE istallation by command line:

devenv.exe /setup 

/setup-强制Visual Studio从所有可用的VSPackage合并描述菜单,工具栏和命令组的资源元数据.

/setup - Forces Visual Studio to merge resource metadata that describes menus, toolbars, and command groups, from all VSPackages available.

或使用详细的日志记录运行它以查看发生了什么:

or run it with detailed logging to see what's happened:

devenv.exe /log

/log -启动Visual Studio,并将所有活动记录到日志文件.

/log - Starts Visual Studio and logs all activity to the log file.

有关,请参见 MSDN:Devenv命令行开关其余受支持的Visual Studio IDE开关

See MSDN: Devenv Command Line Switches for the rest of supported Visual Studio IDE switches

这篇关于当我调试在设计模式下以某种形式打开的项目时,Visual Studio崩溃.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆