Discussion:
MSXML4 DomDocument2 release error
(too old to reply)
viresh
2006-02-08 22:00:53 UTC
Permalink
Hi,
I am using CComPtr<IXMLDomDocument2> in my application.
At times (like one or twice in 200,000 xml msgs) when i delete the class,
IoPlus, where the above variable is stored, i get an Extra call to Release!!!
in the trace window.

My application has 3 threads, each thread does some work and then passes
onto next thread. The last thread logs any errors encountered and then
deletes the structure on heap. The IoPlus class is passed and recv by threads
using IoCompletion ports.

I tried using Windbg but so far it always seems to point to the release of
the pointer in destructor of the IoPlus class. I thought there might be
corruption before the destructor gets called but so far none have been
reported.

Any ideas on what i am doing wrong here?

Thanks
Viresh
P.S:- i get this only in release build( w/ pdb generated )
viresh
2006-02-09 21:10:31 UTC
Permalink
Here is the windbg call stack at the time of exception.

# ChildEBP RetAddr Args to Child
00 08d7f85c 69b18b6d 08d7f870 00000000 0254f1c0 msxml4!assign+0x20
01 08d7f874 69b1f778 00000000 0c63abe0 69b1e427 msxml4!Node::_setText+0x1c
02 08d7f8b8 69b1f79c 0254f220 0254f1c0 0254ee20 msxml4!Node::finalize+0x3b
03 08d7f904 69b1f79c 0254f040 0254ee20 0254f1a0 msxml4!Node::finalize+0x36
04 08d7f918 69b1f032 00000000 08d7f988 01ea8980 msxml4!Node::finalize+0x36
05 08d7f968 69b1e77f 0c63abe0 00000001 00000000
msxml4!Base::freeRentalObjects+0x9a
06 08d7f97c 69b1fe96 01ea88c8 0c63abe0 00000000 msxml4!ScopeGC::release+0x16
07 08d7f990 69b3bf0e 00000001 01ea88c8 01ea88c8
msxml4!Document::_clearDocNode+0x65
08 08d7f9a4 69b3be54 01ea88c8 00000004 00000004 msxml4!Document::finalize+0x8e
09 08d7f9e0 69b1fe3d 00000000 00000000 69b1fe0a msxml4!NonGCBase::_delete+0x3e
0a 08d7f9ec 69b1fe0a 00000000 69b1fddb 00000000
msxml4!NonGCBase::_release+0x21
0b 08d7f9f4 69b1fddb 00000000 01f01c58 00000004 msxml4!Document::_release+0x6
0c 08d7fa28 69b1fc52 01ea88c8 69b3c16a 01f01c58 msxml4!Document::Release+0x35
0d 08d7fa30 69b3c16a 01f01c58 01f01c40 69b3c107 msxml4!release+0x13
0e 08d7fa44 69b202eb 00000001 77d03c10 03b46b90
msxml4!__comexport::~__comexport+0x11
0f 08d7fa90 69b20265 01f01c5c 00416f63 01f01c40 msxml4!DOMNode::Release+0xce
10 08d7fa98 00416f63 01f01c40 77d03c10 03b46b90
msxml4!DOMDocumentWrapper::Release+0xd
11 08d7fac4 004176b7 03b5cac0 03b46b90 77e6b44f
datastreamer!COverlappedPlusTraverseBuffer::~COverlappedPlusTraverseBuffer(void)+0x46
12 08d7feec 004175cb 03b46b90 0041fa79 00000001
datastreamer!COverlappedPlusBuffer::~COverlappedPlusBuffer(void)+0xd8
13 08d7fef4 0041fa79 00000001 00000000 03b6d598
datastreamer!COverlappedPlusBuffer::`scalar deleting destructor'(unsigned int
__flags = 0x439986)+0x8
14 08d7ff5c 00439986 00000000 03b6d598 03b6d598
datastreamer!Clogger::Run(void)+0xec
15 08d7ff84 0045d409 03b5cac0 00000000 00000000
datastreamer!CThread::ThreadFunction(void * pV = 0x03b5cac0)+0x26
16 08d7ffb8 77e66063 03b6d598 00000000 00000000
datastreamer!_beginthreadex+0xca
17 08d7ffec 00000000 0045d3aa 03b6d598 00000000 kernel32!BaseThreadStart+0x34
Loading...