windows 未处理的异常导致应用程序崩溃,日志中显示“EventType clr20r3, P1 w3wp.exe”,但没有详细信息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1937931/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 13:36:58  来源:igfitidea点击:

Unhandled exception that caused the application to crash with "EventType clr20r3, P1 w3wp.exe" in the log, but no details there

asp.net.netwindowscrash

提问by C.C.

On the production server, I can see this event from system Event Viewer when an ASP .NET app crashes:

在生产服务器上,当 ASP .NET 应用程序崩溃时,我可以从系统事件查看器中看到此事件:

EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d691cc,
P4 app_web_default.aspx.cdcab7d2, P5 0.0.0.0, P6 4b2e4bf0, P7 4, P8 4, P9
system.dividebyzeroexception, P10 NIL.*

的EventType clr20r3,P1的w3wp.exe,P2 6.0.3790.3959,P3 45d691cc,
P4 app_web_default.aspx.cdcab7d2,P5 0.0.0.0,P6 4b2e4bf0,P7 4,P8 4,P9
system.dividebyzeroexception,P10 NIL。*

It belongs to ".NET Runtime 2.0 Error Reporting" category.

它属于“.NET Runtime 2.0 错误报告”类别。

But I can't find an event which belongs to "ASP.NET 2.0.50727.0" category which can give me this exception a detailed view like this:

但是我找不到属于“ASP.NET 2.0.50727.0”类别的事件,它可以为我提供此异常的详细视图,如下所示:

An unhandled exception occurred and the process was terminated.  
Application ID: /LM/W3SVC/505951206/Root  
Process ID: 1112  
Exception: System.DivideByZeroException  
Message: Attempted to divide by zero.  
StackTrace:    
   at _Default.Foo(Object state)  
   at System.Threading.ExecutionContext.runTryCode(Object userData)  
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)  
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)  
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)  
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)  
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp

I have the second event on my dev machine, is it because Visual Studio is installed there? If so, how can I disable this so I can emulate the production environment?

我的开发机器上有第二个事件,是因为那里安装了 Visual Studio?如果是这样,我该如何禁用它以便模拟生产环境?

回答by Daniel B

Sometimes you may see this scary error in the Windows Event Log:

有时您可能会在 Windows 事件日志中看到这个可怕的错误:

EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 dp.ui, P5 3.9.7.55, P6 4b49a307, P7 62e, P8 0, P9 system.stackoverflowexception, P10 NIL.

事件类型 clr20r3、P1 w3wp.exe、P2 6.0.3790.3959、P3 45d6968e、P4 dp.ui、P5 3.9.7.55、P6 4b49a307、P7 62e、P8 0、P9 system.stackoverflow 除外

As you can see it is unclear and has no stack trace, and you don't have any idea about P1, …, P10 and any numbers. You know which the worst part of that is; the only thing that make you not to sleep and make you wish if it wasn't in the log, yes! The “dp.ui” message.

如您所见,它不清楚并且没有堆栈跟踪,而且您对 P1、...、P10 和任何数字一无所知。你知道其中最糟糕的部分是什么;如果它不在日志中,唯一让你不睡觉并让你希望的东西,是的!“dp.ui”消息。

Cause

原因

OK, besides of all jokes and wishes, the exception “system.stackoverflowexception” is raised when an infinite loop or method calling happen, so you should check all sources for any recursive method calling and you could fire up Visual Studi to debug that. But it is not possible and feasible all the time even if your application is not enterprise. So you have to google for P1, ..., P10. I did it instead of you, so just sit back and relax!

好的,除了所有的笑话和愿望之外,当无限循环或方法调用发生时会引发异常“system.stackoverflowexception”,因此您应该检查所有递归方法调用的来源,并且您可以启动 Visual Studi 来调试它。但是,即使您的应用程序不是企业应用程序,也不可能始终可行。所以你必须用谷歌搜索 P1, ..., P10。我代替你做的,所以坐下来放松一下!

P1: application name that has occurred this error
P2: application version
P3: application time stamp
P4: Assembly/Module name
P5: Assembly/Module version
P6: Assembly/Module timestamp
P7: MethodDef
P8: IL offset
P9: exception name (hashed because the name is too long)

P1:发生此错误的应用程序名称
P2:应用程序版本
P3:应用程序时间戳
P4:程序集/模块名称
P5:程序集/模块版本
P6:程序集/模块时间戳
P7:MethodDef
P8:IL 偏移
P9:异常名称(散列是因为名字太长了)

Resolution

解析度

It's pretty obvious that we need to find P7, P8. IL Disassembler, a tool included in Visual Studio, will help us to do that.

很明显,我们需要找到 P7、P8。IL 反汇编器,Visual Studio 中包含的一个工具,将帮助我们做到这一点。

  1. Execute IL Disassembler, and open your library.
  2. Menu: view -> MetaInfo -> Show!, pay much attention to the check list of the menu, especialy Raw check boxes.
  3. A dialogue box will appear, search for combination 06000with 62eand you will see the MethodName of the class and by looking up you will see the first TypeDef which declare the class. And that's all!
  1. 执行 IL Disassembler,然后打开您的库。
  2. 菜单:view -> MetaInfo -> Show!,注意菜单的检查列表,尤其是Raw复选框。
  3. 将出现一个对话框,搜索combination 06000with 62e,您将看到该类的MethodName,通过查找您将看到声明该类的第一个TypeDef。就这样!

As you go to your application you may see a recursive calling and you should check the condition that makes this loop exit!

当你进入你的应用程序时,你可能会看到一个递归调用,你应该检查使这个循环退出的条件!

In windows and service application this exception maybe likes the following and you should check “sib.infobase.workflow.services.exe” by “IL Disassembler”:

在 Windows 和服务应用程序中,此异常可能类似于以下内容,您应该通过“IL Disassembler”检查“sib.infobase.workflow.services.exe”:

EventType clr20r3, P1 sib.infobase.workflow.services, P2 1.0.2740.20114, P3 468a74f5, P4 sbpscs, P5 1.0.2740.20087, P6 468a74be, P7 1c, P8 120, P9 zxkyzcs5wacordmkttdkr1xouosi00fr, P10 NIL.

事件类型 clr20r3、P1 sib.infobase.workflow.services、P2 1.0.2740.20114、P3 468a74f5、P4 sbpscs、P5 1.0.2740.20087、P6 468a74be、P7 10sk 1c0d、P7 1c0d、P7 1c0d、P7 1c0d 1c0d

If you surf in the net you may see a solution like Microsoft has prepared: http://support.microsoft.com/kb/911816, but it may be don't work properly for this exception.

如果您在网上冲浪,您可能会看到类似 Microsoft 准备的解决方案:http: //support.microsoft.com/kb/911816,但对于此异常,它可能无法正常工作。

More Info

更多信息

Finding method for error-reporting bucket parameters

错误报告桶参数的查找方法