4

我遇到了一个 C# 应用程序问题,该应用程序可能会在没有警告或有意义的信息的情况下随机崩溃。相同的数据可以通过应用程序,但不会同时崩溃,有时甚至不会崩溃。

我使用 WinDbg 来获取有关异常的一些信息。有一个NullReferenceException被抛出和一个Access Violation错误。

使用 SOSEX,我有一个使用!mk. 我有一个堆栈,顶部有以下内容:

03:M 000000001aefd4f8 000007fef94cfa70 System.Runtime.Remoting.SoapServices.GetXmlTypeForInteropType(System.Type, System.String ByRef, System.String ByRef)(+0x0 IL,+0xd9e9a0 Native)
04:M 000000001aefd4f8 000007fef94cfa6f System.Runtime.Remoting.Metadata.RemotingTypeCachedData.get_QualifiedTypeName()(+0x0 IL,+0xd9ea5f Native)
05:U 000000001aefd500 000007fef991339b clr!CopyValueClassUnchecked+0xb8
06:U 000000001aefd550 000007fef9902491 clr!JIT_BoxFastMPIGT__PatchTLSLabel+0x51
[WARNING: Multiple managed methods at this address]07:M 000000001aefd580 000007fef87350ad System.Collections.Generic.List`1[[System.__Canon, mscorlib]].System.Collections.Generic.IEnumerable<T>.GetEnumerator()(+0x0 IL,+0xff47bced Native)
[WARNING: Multiple managed methods at this address]08:M 000000001aefd5d0 000007fef6d60e4f System.Linq.Enumerable.FirstOrDefault[[System.__Canon, mscorlib]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Func`2<System.__Canon,Boolean>)(+0x22 IL,+0x5f Native)
09:M 000000001aefd630 000007fe9a7885d8 Settings.VersionedSettings.GetSetting(System.DateTimeOffset, System.Guid)(+0x4e IL,+0x258 Native)

开头的行[WARNING: Multiple managed methods at this address]似乎特别令人担忧——这是什么意思?

从下往上看堆栈,到目前为止一切看起来都还不错。然后一个随机的方法调用IEnumerable.FirstOrDefault抛出它。该VersionedSettings.GetSetting(...)方法不进行此类调用。这就是为什么我有点困惑。

编辑:我!verifyheap在 WinDbg 中运行,输出是“未检测到堆损坏。”。我对 WinDbg 的了解有限,所以我不确定这个命令有多准确,但我认为值得添加。

有人知道发生了什么吗?

4

0 回答 0