简体   繁体   English

Microsoft Visual Studio C运行时库检测到致命错误

[英]Microsoft Visual Studio C Runtime Library has detected a fatal error

我必须在“ C#”中创建一个wcf Windows服务...有时它会在我的Windows服务exe中显示此错误“ Microsoft Visual Studio C运行时库检测到致命错误” ...我不知道发生此错误的地方。没有堆栈痕迹。任何人都提前提出解决方案。

can you reproduce the error consistently? 您可以一致地重现错误吗? If so attach a debugger ( like this or this ) to the service and follow the steps to reproduce the error, setting break points in the places where the error happens. 如果是这样,则将调试器( 例如this 或this )连接到服务,并按照步骤重现错误,并在发生错误的位置设置断点。

If not try adding some logging to your service to try and trackdown where the problem is happening and give you some where to focus your investigations when it does crash. 如果没有尝试,请向您的服务中添加一些日志记录,以尝试跟踪问题发生的位置,并在崩溃时为您提供集中精力进行调查的位置。

I would suggest that you check through the Windows Event Viewer for further information on what this error may be. 我建议您通过Windows事件查看器检查有关此错误可能的进一步信息。

Then I would be tempted to place try...catch blocks within your code in likely places where you may be triggering this error. 然后,我很想将try ... catch块放置在代码中可能触发此错误的可能位置。 The Event viewer may give you more detial as to what was called to trigger the error. 事件查看器可以为您提供更多有关触发错误的详细信息。

As you have written a service I would suggest that you look at logging faults like this within the Event Viewer rather than in a log file (although there's no harm in doing this for a fast test). 在编写服务时,我建议您在事件查看器中而不是在日志文件中查看类似的日志记录错误(尽管这样做对于进行快速测试没有害处)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C#中的Microsoft Visual C ++运行时库异常 - Microsoft Visual C++ Runtime Library Exception in c# 运行时的 Microsoft Visual Studio 数组 - Microsoft Visual Studio Arrays at Runtime Visual Studio致命错误0x80131c39 - Visual Studio Fatal Error 0x80131c39 C# - 在 Microsoft Visual Studio 安装程序项目 2022 中安装 .NET 6.0.7 运行时 - C# - Installing .NET 6.0.7 Runtime in Microsoft Visual Studio Installer Projects 2022 Microsoft Visual Studio 2015的VLC库发布 - VLC library at Microsoft Visual Studio 2015 publish Visual Studio C#中的Microsoft Visual Basic - Microsoft Visual Basic in Visual Studio C# Visual Studio中“ vshost32.exe停止工作”或“致命执行引擎错误” - “vshost32.exe has stopped working” OR “fatal execution engine error” in Visual Studio Visual Studio在WPF设计视图中挂起-“ .NET运行时版本2.0.50727.3053-致命执行引擎错误(7A2E0F92)(0)” - Visual Studio Hangs in WPF Design View - “.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A2E0F92) (0)” Visual Studio 安装程序错误与 Visual C++ 2017 运行时库 (x64) 先决条件 - Visual studio installer error with Visual C++ 2017 Runtime Libraries (x64) prerequisite 查找在Visual Studio运行时在系统上安装的Microsoft Office版本 - Finding version of Microsoft Office installed on system at runtime in Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM