0

I'm running into some nasty msxml6 crash, it is a timing issue happening very intermittently, it is all happening inside msxml6 garbage collection code, i have read some of their tech note regarding msxml6 garbage collection, it did not really help, is there a way to disable msxml6 garbage collection, partial as well as full garbage collection.

Any help is greatly appreciated.

Thanks

Snekithan
  • 360
  • 3
  • 11
  • MSXML is not "garbage collected". It consists of COM interfaces, which are reference counted. (To specifically answer your question, you avoid the problem by keeping a valid reference to the COM interfaces, so that their reference counts don't fall to zero and cause them to be released.) If you're having trouble with your code, you need to post that code, ask a specific question about the problem you're having, and provide proper tags so we know what you're asking here. – Ken White May 30 '13 at 01:42
  • Hi Ken, I totally understand your response, i was thinking the same, but MSXML uses their own smart pointer wrapper to do internal garbage collection, which is what i was referring to. Please take a look:http://support.microsoft.com/kb/304227 – Snekithan May 30 '13 at 16:22
  • Ah, it's their change in phrasing I wasn't aware of. Thanks for the correction. You did see on that page that there's an answer to your question as well? (Which you should make an answer and post here, since you found it. It's acceptable here to answer your own question; you can even accept it as correct. You don't earn rep for your own answer and accept, but others can upvote it and you get the rep for those votes.) – Ken White May 30 '13 at 16:44
  • It is for msxml4; any way i have tried, but it did not help, there is no way to turn off both garbage collection (partial and full) on msxml6. – Snekithan May 30 '13 at 18:49
  • I don't think the MSXML GC is your issue; it might cause performance bottlenecks because of fragmentation if you're creating and freeing references repeatedly or mixing `DOMDocument` and `FreeThreadedDOMDocument` in a multi-threaded app. It's hard to say what the problem might be, though; your specific question is how to disable it, and the page you linked says that as of MSXML 4 you should avoid doing so; I'd suspect that it's no longer supported at all. I can't offer any advice because that's all you asked and provided info about, I'm afraid. Good luck. :-) – Ken White May 30 '13 at 18:58

1 Answers1

0

Based on further testing, i believe that MSXML GC has a bug, when FreeThreadedDOMDocument is used in multithreaded application and msxml.dll is loaded and unloaded repeatedly there is a bug in the partial garbage collection, unfortunately it is not easy to repro. I could disable full garbage collection by setting NoFullGC in the registry, but there is no way to disable partial garbage collection. There is a memory leak reported on GC: http://social.msdn.microsoft.com/Forums/en-US/xmlandnetfx/thread/d24026c0-5cbe-451c-89b8-895cbe31d761/

Snekithan
  • 360
  • 3
  • 11