我有一个用VB编写的解决方案(有一个C#项目),我正在visualstudio 2015中调试。当我命中断点并将鼠标悬停在对象上时,代码会崩溃,并出现以下错误:
The program '[18348] MRS.ProductSupport.UI.vshost.exe' has exited with code -2147023895 (0x800703e9).
我没有找到任何关于这个错误的相关信息,也没有解释为什么会发生这种情况。有一些网站说这是一个IIS问题。我的代码确实使用了Web服务,但这不是从我正在调试的代码部分调用的。
奇怪的是,我可以查看对象的属性而不会崩溃。例如,我有以下对象:
item.FeatureID
我可以在上面徘徊
FeatureID
得到一个值。如果我停留在
item
这以前是一个间歇性的问题,但我的系统已更新到Windows10,现在看来,任何对象都会导致代码崩溃,当我查看它。
只是澄清一下,如果没有断点,代码就会运行。我不是在处理空对象。我确实尝试进入Properties->Debug,并选中“Enable native code debugging”,但没有成功。我的目标是.NET4。
更新:
在我的一次测试过程中,visualstudio崩溃了。当我重新打开它时,我可以访问该对象并查看所有属性。我使用了精确的断点,并像以前一样检查了精确的对象。但是,下一次我运行时,代码再次崩溃。我退出了visualstudio并重新启动,但这次问题没有得到解决。
我确实从一个单独的VS实例附加了一个调试进程,并且能够捕获这些错误:
Exception thrown at 0x768DDDC2 (KernelBase.dll) in devenv.exe: 0x80010108: The object invoked has disconnected from its clients (parameters: 0x2FD31E30).
The thread 0x56ac has exited with code 0 (0x0).
The thread 0x547c has exited with code 0 (0x0).
The thread 0x55f4 has exited with code 0 (0x0).
OnException: filter exception.
Microsoft.VisualStudio.Debugger.DkmException: Error in the application.
at Microsoft.VisualStudio.VIL.VisualStudioHost.VilEvaluationServices.EvaluateToString(DkmInspectionContext inspectionContext, VilEvaluationResult evalResult)
at VSDebugEngine.ClrInspector.EntryPoint.Microsoft.VisualStudio.Debugger.ComponentInterfaces.IDkmClrValueInspectionCallback.EvaluateToString(DkmClrValue clrValue, DkmInspectionContext inspectionContext)
at Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrValueInspectionCallback_EvaluateToString(IntPtr pvClassInfo, IntPtr ClrValue, IntPtr InspectionContext, IntPtr& Result)'devenv.exe' (Win32): Unloaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll'
The thread 0x55e8 has exited with code 0 (0x0).
OnException: filter exception.
Microsoft.VisualStudio.Debugger.DkmException: Error in the application.
at XapiExceptionProcessing.ThrowHR(Int32 code)
at Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue.EvaluateToString(DkmInspectionContext InspectionContext)
at Microsoft.CodeAnalysis.ExpressionEvaluator.Formatter.GetValueString(DkmClrValue value, DkmInspectionContext inspectionContext, ObjectDisplayOptions options, GetValueFlags flags)
at Microsoft.CodeAnalysis.ExpressionEvaluator.Formatter.Microsoft.VisualStudio.Debugger.ComponentInterfaces.IDkmClrFormatter.GetValueString(DkmClrValue value, DkmInspectionContext inspectionContext, ReadOnlyCollection`1 formatSpecifiers)
at Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrFormatter_GetValueString(IntPtr pvClassInfo, IntPtr ClrValue, IntPtr InspectionContext, IntPtr FormatSpecifiers, IntPtr& ValueString)The thread 0x2ccc has exited with code 0 (0x0).
OnException: filter exception.
Microsoft.VisualStudio.Debugger.DkmException: Error in the application.
at XapiExceptionProcessing.ThrowHR(Int32 code)
at Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue.GetValueString(DkmInspectionContext InspectionContext, ReadOnlyCollection`1 FormatSpecifiers)
at Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.GetResult(DkmInspectionContext inspectionContext, EvalResultDataItem dataItem, DkmClrType declaredType, DkmClrCustomTypeInfo declaredTypeInfo, String displayName, String displayValue, String displayType, EvalResultDataItem parent)
at Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.GetResultAndContinue(EvalResultDataItem dataItem, WorkList workList, DkmClrType declaredType, DkmClrCustomTypeInfo declaredTypeInfo, DkmInspectionContext inspectionContext, EvalResultDataItem parent, CompletionRoutine`1 completionRoutine)
at Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.GetRootResultAndContinue(DkmClrValue value, WorkList workList, DkmClrType declaredType, DkmClrCustomTypeInfo declaredTypeInfo, DkmInspectionContext inspectionContext, String name, CompletionRoutine`1 completionRoutine)
at Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Microsoft.VisualStudio.Debugger.ComponentInterfaces.IDkmClrResultProvider.GetResult(DkmClrValue value, DkmWorkList workList, DkmClrType declaredType, DkmClrCustomTypeInfo declaredTypeInfo, DkmInspectionContext inspectionContext, ReadOnlyCollection`1 formatSpecifiers, String resultName, String resultFullName, DkmCompletionRoutine`1 completionRoutine)
at Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrResultProvider_GetResult(IntPtr pvClassInfo, IntPtr ClrValue, IntPtr WorkList, IntPtr DeclaredType, IntPtr CustomTypeInfo, IntPtr InspectionContext, IntPtr FormatSpecifiers, IntPtr ResultName, IntPtr ResultFullName, IntPtr CompletionRoutine)Exception thrown at 0x768DDDC2 (KernelBase.dll) in devenv.exe: 0x80010108: The object invoked has disconnected from its clients (parameters: 0x2FD31D30).
Exception thrown at 0x768DDDC2 (KernelBase.dll) in devenv.exe: 0x80010108: The object invoked has disconnected from its clients (parameters: 0x2FD31EB0).
附加信息
我对正在查看的对象(名为“item”)运行了一个GetType,然后对其进行了扩展,出现了三个可见的异常。老实说,我不知道这是否是问题的原因,但我想我会分享一下,以防它有帮助:
三个都跑了
DirectCast((item.GetType()), System.RuntimeType).DeclaringMethod
三个人都收到了一封信
System.InvalidOperationException
.