windows Net 运行时错误:.NET 运行时 2.0 错误 - 事件 ID:1000 使我的程序崩溃。这是什么原因造成的?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3871067/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Net Runtime Bug : .NET Runtime 2.0 Error - Event Id: 1000 Crashed my program. What caused this?
提问by DayTwo
I have a new program which has been running 24/7 for over 2 weeks now but last night it crash/went down with no Fatal log exception in my log4net file ...the process appears to have been killed by someting .... and when I looked in the Windows Event Viewer Application log it contained an error for the programs process saying '.NET Runtime 2.0 Error' Type: Error EventID: 1000.
我有一个新程序,它已经 24/7 全天候运行了 2 个多星期,但昨晚它崩溃/崩溃了,我的 log4net 文件中没有致命的日志异常......该进程似乎已被某些人杀死......当我查看 Windows 事件查看器应用程序日志时,它包含程序进程的错误,说“.NET 运行时 2.0 错误”类型:错误事件 ID:1000。
This appears to be a .Net runtime failure/bug and has nothing to do with my code.
这似乎是 .Net 运行时故障/错误,与我的代码无关。
Does anyone know what caused this? Is there a .Net runtime fix?
有谁知道这是什么原因造成的?是否有 .Net 运行时修复?
/I'm running .Net 3.5 on a Window Server 2003 vm slice.
/我在 Window Server 2003 虚拟机切片上运行 .Net 3.5。
Thanks in advance.
提前致谢。
Edit:
编辑:
Full event description below. There's were no events around it for hours and there were Info level not Error like this one.
完整的事件描述如下。几个小时内没有发生任何事件,并且信息级别不是像这样的错误。
Source: .NET Runtime 2.0 Error Type: Error Event Id: 1000
来源:.NET Runtime 2.0 错误类型:错误事件 ID:1000
Event log description:Faulting application CompanyName.AppName.exe, version 0.0.0.0, stamp 4ca5d33d, faulting module mscorwks.dll, version 2.0.50727.3607, stamp 4add5446, debug? 0, fault address 0x0010724e.
事件日志描述:故障应用程序 CompanyName.AppName.exe,版本 0.0.0.0,标记 4ca5d33d,故障模块 mscorwks.dll,版本 2.0.50727.3607,标记 4add5446,调试?0,故障地址0x0010724e。
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
有关详细信息,请参阅http://go.microsoft.com/fwlink/events.asp 上的帮助和支持中心。
回答by Jason Evans
As you are not getting any useful information at the time of the crash, an alternative approach is to attach a debugger to the crashing EXE
. There are two ways I suggest:
由于在崩溃时您没有获得任何有用的信息,另一种方法是将调试器附加到崩溃的EXE
. 我建议有两种方法:
Using Visual Studio
使用 Visual Studio
If you have Visual Studio installed on the same PC/server as the crashing app, attach Visual Studio to the EXE
whilst it's running. Here's an intro on how to do this:
如果您在与崩溃的应用程序相同的 PC/服务器上安装了 Visual Studio,请EXE
在它运行时将 Visual Studio 附加到它。这是有关如何执行此操作的介绍:
http://msdn.microsoft.com/en-us/library/c6wf8e4z.aspx
http://msdn.microsoft.com/en-us/library/c6wf8e4z.aspx
Using WinDbg
使用 WinDbg
This is a very low-level, and powerful, debugger for Windows. This could certainly help you with your problem. However, there is a steep learning curve in how to get started in using it. The .NET framework comes with a DLL
named SOS.DLL
(found in the C:\Windows\......
system folder) which contains many commands that you can use in WinDbg to analyse a .NET application. These include listing thread stack and displaying exception information.
这是一个非常低级且功能强大的 Windows 调试器。这当然可以帮助您解决问题。但是,如何开始使用它有一个陡峭的学习曲线。.NET 框架带有一个DLL
命名SOS.DLL
(在C:\Windows\......
系统文件夹中),其中包含许多可以在 WinDbg 中用于分析 .NET 应用程序的命令。这些包括列出线程堆栈和显示异常信息。
A very good source of information on how to debug .NET issues with WinDbg is
关于如何使用 WinDbg 调试 .NET 问题的一个很好的信息来源是
There are many great examples of how to debug issues, such as
有很多关于如何调试问题的很好的例子,例如
http://blogs.msdn.com/b/tess/archive/2008/02/11/net-debugging-demos-lab-2-crash-review.aspx
http://blogs.msdn.com/b/tess/archive/2008/02/11/net-debugging-demos-lab-2-crash-review.aspx
You can download WinDbg from:
您可以从以下位置下载 WinDbg:
- 32bit version http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#E3
- 64bit version http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx-
- 32 位版本 http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#E3
- 64 位版本 http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx-
I would highly recommend the Visual Studio approach, due to its simplicity. However, by far the most powerful way to debug your app is to use WinDbg, but it can be intimidating for first time users.
我强烈推荐 Visual Studio 方法,因为它很简单。然而,到目前为止,调试应用程序的最强大的方法是使用 WinDbg,但它对于初次使用的用户来说可能会令人生畏。
EDIT: Here's another link that might be of use:
编辑:这是另一个可能有用的链接:
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/ebd10d1f-902b-4a95-ba42-e87c4f817097
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/ebd10d1f-902b-4a95-ba42-e87c4f817097
回答by Bill W
The error looks like a .NET Runtime 2.0 error due to null reference is in the user policy cache. Make sure that you have all the latest .NET service pack installed. Also take a look at this Microsoft answer.
由于空引用在用户策略缓存中,该错误看起来像是 .NET 运行时 2.0 错误。确保您安装了所有最新的 .NET 服务包。也看看这个微软的回答。