简体   繁体   English

.NET 4.0 进程中的 clr.dll!LogHelp_TerminateOnAssert

[英]clr.dll!LogHelp_TerminateOnAssert in a .NET 4.0 process

Background: I am working on a WinForm based .NET 4.0 desktop application that has few threads and timers and uses some GDI processing for user controls.背景:我正在开发一个基于 WinForm 的 .NET 4.0 桌面应用程序,该应用程序具有很少的线程和计时器,并使用一些 GDI 处理来处理用户控件。 During my development I usually peep into sysinternal's Process Explorer to make sure that there isn't anything unusual with my application such as count of GDI handles or user objects etc.在我的开发过程中,我通常会查看 sysinternal 的 Process Explorer 以确保我的应用程序没有任何异常,例如 GDI 句柄或用户对象的计数等。

Problem: While using Process Explorer, I found that Threads tab for my application's property in Process Explorer shows a lots and lots of entries of "clr.dll!LogHelp_TerminateOnAssert+0x58f68".问题:在使用进程资源管理器时,我发现进程资源管理器中应用程序属性的线程选项卡显示了大量“clr.dll!LogHelp_TerminateOnAssert+0x58f68”条目。 Is this normal?这是正常的吗? I think it is not because non of other .net application (that I had written in the past) shows the same entry in their properties in Process Explorer.我认为这不是因为其他 .net 应用程序(我过去编写的)在 Process Explorer 的属性中显示相同的条目。

Whats is LogHelp_TerminateOnAssert()? LogHelp_TerminateOnAssert() 是什么? (I believe it is a function in clr.dll) (我相信它是 clr.dll 中的一个函数)

Why is LogHelp_TerminateOnAssert() getting called so many times?为什么 LogHelp_TerminateOnAssert() 被调用这么多次?

Any pointers will be very helpful.任何指针都会非常有帮助。

Thanks in advance.提前致谢。

clr.dll!LogHelp_TerminateOnAssert+0x58f68 clr.dll!LogHelp_TerminateOnAssert+0x58f68

The large number (+58f68) indicates that the actual method in clr.dll is far away from LogHelp_TerminateOnAssert().大数(+58f68)表示clr.dll中的实际方法与LogHelp_TerminateOnAssert()相差甚远。 You should probably fix the symbols and try again in order to get the correct call stack.您可能应该修复符号并重试以获得正确的调用堆栈。 You can then find out what the real method is.然后你可以找出真正的方法是什么。

It's not LogHelp_TerminateOnAssert(), so it's useless to find out what LogHelp_TerminateOnAssert() does.它不是 LogHelp_TerminateOnAssert(),因此找出 LogHelp_TerminateOnAssert() 的作用是没有用的。

To fix the symbols: in Process Explorer, go to Options/Configure Symbols , then enter要修复符号:在 Process Explorer 中,转到Options/Configure Symbols ,然后输入

SRV*c:\symbols*http://msdl.microsoft.com/download/symbols

where c:\\symbols is the path where you want to store the downloaded files.其中c:\\symbols是您要存储下载文件的路径。

You mention using threads - since each thread gets its own stack it could be that the default stack size is being exceeded at some point causing the exception which is then trapped by the .NET runtime.您提到使用线程 - 由于每个线程都有自己的堆栈,因此可能在某些时候超出了默认堆栈大小,从而导致异常,然后由 .NET 运行时捕获。 What kind of work are you doing in the threads (recursion, lots of stack variables, etc)?你在线程中做了什么样的工作(递归、大量堆栈变量等)?

I believe default thread stack size is set at 1MB - try setting the stack size to 4MB in the thread constructor and see if the error persists.我相信默认线程堆栈大小设置为 1MB - 尝试在线程构造函数中将堆栈大小设置为 4MB,看看错误是否仍然存在。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM