是否存在 Stack Trace 可能完全为空的情况? 我收到了从机器事件属性复制的事件日志文本,内容如下:
Description: An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 123
Exception: System.OutOfMemoryException
Message: Exception of type 'System.OutOfMemoryException' was thrown.
StackTrace:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Stack Trace 在我看来很可疑。我在论坛和文档上搜索了很多 - 堆栈跟踪没有任何内容是空的。只有 MSDN 提到“StackTrace 属性可能不会报告预期的方法调用,因为在优化过程中会发生代码转换,例如内联。”,但根本没有任何方法调用报告。 p>
在联系确认之前我需要确定,因为这是一个多层次的沟通,需要时间来回复..
对我怀疑 Stack Trace 不能为空的任何更正?
最佳答案
有时,调用堆栈本身可能是 OOM 的原因(调用堆栈中太多)。
所以...你看到了问题。
或者堆可能已耗尽,或者...或者,请参阅@Oded 评论!
关于c# - 清空堆栈跟踪。可能的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10530772/