VShost32.exe 停止工作,但我可以继续调试 [英] VShost32.exe stopped working, but I can continue debugging

查看:95
本文介绍了VShost32.exe 停止工作,但我可以继续调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序首先从数据库读取数据,然后创建要上传到 SFTP 服务器的 XML 文档.

My application first reads data from a database and then creates an XML document to be uploaded to a SFTP server.

当我运行应用程序时出现错误:

When I run the application I get an error:

VShost32.exe 停止工作

当我在调试模式下运行应用程序并单步执行时,我找到了弹出错误的点,但我仍然可以继续进行下一步(只要我不关闭弹出窗口).然后,该做的,都做完了.完全没有问题.

When I run the application in debug mode and step through it, I find the point where the error pops up, but I can still continue to step to the next steps (as long as I don't close the pop up). Then, everything that should be done, is done. No problems at all.

那么为什么我会收到此错误消息?完全不清楚是什么原因造成的.

So why do I get this error message? It's completely unclear on what is causing it.

另外,我怎样才能摆脱它?

Also, How can I get rid of it?

推荐答案

VSHost32.exe 是 Visual Studio 托管进程.它有一个自定义托管的 CLR 版本,使调试更容易.实际进程名是yourapp.vshost.exe,可以在任务管理器中看到运行.

VSHost32.exe is the Visual Studio Hosting process. It has a custom-hosted version of the CLR that makes debugging easier. The actual process name is yourapp.vshost.exe, you can see it running in Task Manager.

因此该消息的真正含义是您的程序崩溃了,但不是以调试器可以识别的方式崩溃.如果您使用的库启动其自己的非托管线程并且该线程因未处理的异常而崩溃,那么这在技术上是可行的.默认情况下,调试器只能诊断由托管代码启动的线程引发的异常.

So what the message really means is that your program has crashed, but not in way that the debugger can identify. Which is technically possible if the library you use starts its own unmanaged thread and that thread crashed on an unhandled exception. By default, the debugger can only diagnose exceptions that are raised on a thread started by managed code.

在这次崩溃后您能够继续调试是非常不寻常的,并且可能非常不健康.如果您使用的库使用 SetUnhandledExceptionFilter() 安装自己的未处理异常过滤器并吞下异常,那么这在技术上是可行的.但是托管过程已经看到它之后.这是非常了不起的.

That you able to continue debugging after this crash is very unusual and potentially pretty unhealthy. This is technically possible if the library you use installs its own unhandled exception filter with SetUnhandledExceptionFilter() and swallows the exception. But does so after the hosting process has seen it. Which is pretty remarkable.

通过启用非托管调试器获得更好的诊断.项目 + 属性,调试选项卡,勾选启用非托管代码调试"选项.然后调试 + 异常,勾选 Win32 异常的抛出复选框.重现崩溃场景,调试器现在应该在抛出异常时停止.查看调用堆栈以获取提示.您将看不到任何可识别的内容,因为崩溃的代码可能没有任何调试信息.但希望包含代码的 DLL 的名称可以让您看到是哪个库对此负责.然后联系图书馆的供应商并询问详情.

Get better diagnostics about this by enabling the unmanaged debugger. Project + Properties, Debug tab, tick the "Enable unmanaged code debugging" option. Then Debug + Exceptions, tick the Thrown checkbox for Win32 Exceptions. Repro the crash scenario, the debugger should now stop when the exception is thrown. Look at the call stack for hints. You are not going to be able to see much of anything recognizable since there probably isn't any debug info for the code that crashed. But hopefully the name of the DLL that contains the code lets you see what library is responsible for this. Then contact the vendor of the library and ask for details.

这篇关于VShost32.exe 停止工作,但我可以继续调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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