相关疑难解决方法(0)

使用WinDbg将托管字节[]的内容写入文件

我有一个来自生产服务器的崩溃转储,显示OutOfMemoryException.例外本身与此无关.

我碰巧运行了一个!dso来查看堆栈对象:

0:042> !dso
OS Thread Id: 0x1014 (42)
ESP/REG  Object   Name
246eeb24 109a21bc System.UnhandledExceptionEventHandler
246eeb2c 39083998 System.Runtime.Remoting.Proxies.__TransparentProxy
246eeb34 39083b5c System.UnhandledExceptionEventArgs
246eeb48 39073280 System.Byte[]
246eec10 2e720050 System.OutOfMemoryException
[snip]
246ef250 0ac1c4d0 System.IO.MemoryStream <-- interesting
Run Code Online (Sandbox Code Playgroud)

我以为MemoryStream可能与错误有关,所以我把它丢弃了:

0:042> !do 0ac1c4d0 
Name: System.IO.MemoryStream
MethodTable: 7932d5e4
EEClass: 790ec318
Size: 52(0x34) bytes
 (C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
Fields:
      MT    Field   Offset                 Type VT     Attr    Value Name
7933061c  400018a        4        System.Object  0 instance 00000000 __identity
7992cbcc  4001b6c        8 ...ream+ReadDelegate  0 instance 00000000 _readDelegate
7992cc58  4001b6d        c ...eam+WriteDelegate  0 instance 00000000 _writeDelegate …
Run Code Online (Sandbox Code Playgroud)

windbg sos

16
推荐指数
1
解决办法
6583
查看次数

标签 统计

sos ×1

windbg ×1