473,378 Members | 1,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

WinDbg and XmlText objects

I have a memory problem that keeps causing server resets, so I'm using
WinDbg to figure out what the problem is.

When I look at the heap, WinDbg tells me that there are over one
million XmlText objects, each taking up 20 bytes.

If I do a memory view of one of them, I get this:

10017c58 7c bb 08 16 fc 7b 01 10 58 7c 01 10 84 7b 01 10 00 00 00 00

How do I get the Value property from this?

Thanks,

Jeff Ross

Nov 19 '05 #1
1 2506
Hi Jeff:

Here is how I would get to the value:
0:021> .load E:\Program Files\Debugging Tools for Windows\clr10\sos
0:021> !EEVersion
Loaded Son of Strike data table version 5 from
"E:\WIN2003\Microsoft.NET\Framework\v1.1.4322\msco rwks.dll"
1.1.4322.2300 retail
Workstation build

// So far I've just loaded the SOS extension DLL.

0:021> !name2ee System.Xml.dll System.Xml.XmlText
--------------------------------------
MethodTable: 01e7bf84
EEClass: 01e66894
Name: System.Xml.XmlText

// This gives me the MethodTable for XmlText, I can use the
// MT to scan the heap for all instances of XmlText:

0:021> !dumpheap -mt 01e7bf84
Address MT Size Gen
0256e524 01e7bf84 20 2 System.Xml.XmlText
0256e59c 01e7bf84 20 2 System.Xml.XmlText
total 2 objects
Statistics:
MT Count TotalSize Class Name
1e7bf84 2 40 System.Xml.XmlText
Total 2 objects

// The formatting on this post might not be the best, but you can
// see above I have two XmlText objects on the heap, so let's
// take a look at the first one:

0:021> !dumpobj 0256e524
Name: System.Xml.XmlText
MethodTable 0x01e7bf84
EEClass 0x01e66894
Size 20(0x14) bytes
mdToken: 0200008a (Unknown Module)
FieldDesc*: 00000000
MT Field Offset Type Attr Value
Name
01e7631c 4000350 4 CLASS instance 0256e3fc
parentNode
01e7752c 4000372 8 CLASS instance 0256e538
next
01e7ab94 4000373 c CLASS instance 02166ba8
data

// First thing to notice is that all XmlText objects have a
// size of 20 bytes because they include three object references
// in thier instance data.
//
// The third field (data) is the one you want to look at, so let's
// DumpObject again:

0:021> !dumpobj 02166ba8
Name: System.String
MethodTable 0x79b94638
EEClass 0x79b94984
Size 92(0x5c) bytes
mdToken: 0200000f (Unknown Module)
String: This is the text of the root element
FieldDesc*: 79b949e8
.....

// So the first XmlText object contained a reference to a string, the
// string takes up 92 bytes on the heap and the text of the string is
// "This is the text of the root element".
You might also want to check out CLRProfiler before getting into this
level of detail....

--
Scott
http://www.OdeToCode.com/blogs/scott/
On 31 May 2005 15:21:02 -0700, "thejeffross" <th*********@gmail.com>
wrote:
I have a memory problem that keeps causing server resets, so I'm using
WinDbg to figure out what the problem is.

When I look at the heap, WinDbg tells me that there are over one
million XmlText objects, each taking up 20 bytes.

If I do a memory view of one of them, I get this:

10017c58 7c bb 08 16 fc 7b 01 10 58 7c 01 10 84 7b 01 10 00 00 00 00

How do I get the Value property from this?

Thanks,

Jeff Ross


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: mich | last post by:
Hi I am trying to use Windbg with SOS.dll on VS 2003 by following the article "SOS:It's Not Just an ABBA Song Anymore" at http://msdn.microsoft.com/msdnmag/issues/03/06/Bugslaye I tried the...
0
by: Patrick Matusz | last post by:
How can I create from VB a minidump of my application at runtime for the WinDbg Application from MS? We need this because our application breaks sometime at any state and the stacktrace only shows...
2
by: Michel | last post by:
Hi there, I have an enum field that I serialize: public ParameterDirection Direction = ParameterDirection.Out; The enum looks like this: public enum ParameterDirection { In, Out, Both };
2
by: Anirudh | last post by:
Hi, i wanted to know if there is any way to convert an object to XMlText to XMLElement. Thanks in advance.
0
by: Andrew Burgher | last post by:
Feeding the following .xsd into the XsdObjectGen (v1.4.2.0) tool produces an invalid attribute: with DataType="System.String". Has anybody seen this behaviour before? Is this a bug in...
2
by: Itjalve | last post by:
I have a heap problem in my com exe server. When i use windbg as the compiler in application verifier is windbg started and i can press 'g' and the server is running unitil i get the exception. ...
2
by: junk | last post by:
This seems something that should be easy and not uncommon... but hours of searching have yielded nothing! I am using XmlSerializer to map some XML (not defined by me) into some class objects...
1
by: conckrish | last post by:
Hi All, Can anyone tell me how to give the input(object address) to !objsize <address> command in WinDbg .. I have a list of object addresses in a file which is stored in local drive.. How to...
2
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hello, guys, I could not find WinDbg.exe in my machine, although I installed .net 2005. I seached ms download center with WinDbg keyword, but no luck. Anyone knows which exact web page to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.