Re: Access violation in MSXML.dll ???

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi John,
I sent a good enoght time on net to get any similar issue faced before. But
not a songle one I could get. In my app:

1. I am using VS2005
2. In the XML module, I do call CoUninitialize() and
pWriteXMLDoc->Release().

Below is the destructor for XML module:

if(m_pReadXMLDoc)
{
m_pReadXMLDoc->Release();
}

if(m_pWriteXMLDoc)
{
m_pWriteXMLDoc->Release();
}

m_pReadXMLDoc = NULL;
m_pWriteXMLDoc = NULL;

CoUninitialize();

Now the strange this is that, while debuging the app as I put breakpoint
over first statement of destructur, breakpoint slides down to the last return
statement. It seems object code for code in destructor is not being
generated, so that whatever I have written in destructor is not being
executed. But if I put a simple "hello" message box as a first stement in
destructor, everthing goes fine (Is this messagebox code is forcing rest of
the destructor code to be executed ???).

Main problem is, I "HAVE TO" delete the created XMl file any how, otherwise
app will not go ahead :(

Any workaroud for this issue ????

- Rahul

"John Spaith [MS]" wrote:

As far as the threads spun up, this is either an URLMON or Wininet
background worker thread. They basically always stay loaded, so don't worry
about that. Similarly MSXML DLL will stay loaded for some time after
loading, you'd need to be calling CoFreeUnusedLibraries or else
CoUninitialize to actually get the DLL unloaded.

For the problem around crashing, you may want to lookup
http://blogs.msdn.com/cenet/archive/2005/07/27/msxml-hangs-on-bad-xml-with-embedded-visual-c-4-2.aspx
to see if that's helpful. It's not exactly the same problem you're seeing,
but there are known problems with the EVC debugger on CE4.2 based devices
(which PocketPC 2003 is) which end up causing MSXML to do bad things. There
are workaround suggested in the article.

If this doesn't solve the problem, you will probably have to workaround the
problem somehow since we're not able to update MSXML on older devices and
I've never heard of the issues you're hitting before. My suggestion,
admittedly a hack, is that you wrap the call to the Delete or whatever other
methods are giving you problems with a __try/__except to catch the error
yourself and avoid the app from getting shutdown.

Apologies for the problems you've hit here and hope this is helpful.

--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"Rahul P. Shukla" <RahulPShukla@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5B101F3E-2E46-4BBC-969D-78872156D22F@xxxxxxxxxxxxxxxx
Hi,
I am totally stuck with the below described problem related with msxml.dll
(in pocket PC 2003).
In my application (which is build for all Pocket PC2003/WM5 and
above/WinCE
devices). I am using xml file creation/writing.
Problem is with Pocket PC 2003 devices only (and might be same with WinCE
4.2 based device). Whenever I try to cerate an instance of DOM object as:

pWriteXMLDoc.CreateInstance(__uuidof(DOMDocument));

It loads msxml.dll in memory and then in the next line I call load() to
load
the xml document as:

pWriteXMLDoc->load(FBInput_INFO_PATH);

which creates a new thread (I don't know why ??)

Not this msxml.dll remains in memory though I come out from xml creation
writing module, and that newly created thread still alive. So the problem
is,
when I try to delete the xml file, it throws a access violation error, and
kills my application. I have tried a lot, but that msxml.dll and newly
created thread is alive in memory. Though I am calling

pWriteXMLDoc->Release();

but its not releasing anything (neither MSXML.dll nor killing the thread).
?
. I am badly stuck here. Same code is working in higher version of Pocket
PC
2003. I have read that Pocket PC 2003 uses MSXML version 2.0, 2.5 & 2.6,
which have an access violation issue.

Refer: http://support.microsoft.com/kb/274734

Is my problem related with the same issue in these MSXML versions?
What may be the solution of the above mentioned problem?
Please let me know, if you know something. I am in a great problem because
of this issue. Thanks in advance for any reply .




.



Relevant Pages

  • Re: Interplatform (interprocess, interlanguage) communication
    ... If I'm using XML at all, and JAXB suits, I'll use JAXB. ... one can wonder though, what really would be the gain of using XML syntax in many such cases, vs the typical "relative niceness" of a line oriented format. ... typically I don't deal a whole lot with anything "security ... a 3rd party could somehow break the app and get control of the users' OS ...
    (comp.lang.java.programmer)
  • Re: Data source options
    ... > customer to access the app and own the data. ... and by keeping the "main database" closer to the "web application ... I've been watching the "maturation" of the XML space. ... Visage ISN'T free - but it is cheap as chips ...
    (comp.databases.pick)
  • Re: How to reset MPU-401
    ... The problem however arises when a user tries to terminate the app. ... The destructor is called but my app. ... HMIDIIN MidiInHandle = 0; ... HMIDIIN WINAPI OpenMidiIn ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: Interplatform (interprocess, interlanguage) communication
    ... If I'm using XML at all, and JAXB suits, I'll use JAXB. ... typically I don't deal a whole lot with anything "security ... a 3rd party could somehow break the app and get control of the users' OS ... standards like the Java Secure Coding Guidelines, ...
    (comp.lang.java.programmer)
  • Re: Clarification about Delphi
    ... .NET is just XML or a larger subset of SGML. ... version of a very old mark up language called SGML. ... app without having to deliver all the data as well as the app each and every ... > Think of it as a framework, like the VCL in Delphi, that is going to underly> Windows development for the next 5 or more years and is meant to replace> using the Windows API. ...
    (borland.public.delphi.non-technical)