Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Msxml2.XMLHTTP hangs

Status
Not open for further replies.

tomih

Programmer
Sep 23, 2003
13
SI
Hi again!

I made a client code which fatches an xml file from a server.

The client code looks like:
Code:
function onButtonClick() {
	http = new ActiveXObject( 'Msxml2.XMLHTTP' );
	http.open( 'GET', "[URL unfurl="true"]http://myserver.com/testXML.asp",[/URL] true );
	http.onreadystatechange = function() {
		if( http.readyState == 4 ) {
			var doc = http.responseXML;
			doc.setProperty( 'SelectionLanguage', 'XPath' );
			var root = doc.selectSingleNode( "//root/table" );
							
			//get all subnodes
			var oNodes = doc.selectNodes( "//root/table/*");
			// create an instance of table
			var oTable = HTMLTable();
			//draw TRs and TDs to a table				
			drawNodes(oNodes, oTable, doc); //this function creates a table from xml data
			//append table to existing DIV on page				
			someDiv.appendChild(oTable);

			doc = null;
			http = null;
		}
	}
	http.send();
}

The testXML.asp file returns valid XML file with contentType set to "text/xml".

Most of the time it works fine, but from time to time (i found no pattern) IE hangs.
The hang occurs before actual drawing of table (drawNodes, appendChild) or in the middle of appending the table (appendChild).
The hang lasts from few minutes to infinity. If the hang timeouts, no call to above function work any more.

The hang occurs unexpectedly retrieving same XML.

Any ideas?
Tomi


Tomi Hrovatin
 
Some new findings...

I found that the thing locks after ReadyState=1 and before ReadyState=2.
The lock lasts for approx. 3-5 minutes. Then the object reaches ReadyState=4 without any data.
After the first lock, every call to the function locks after ReadyState=1 and the lock releases after timeout to ReadyState=4 without data.




Tomi Hrovatin
 
What environment are you working under ? OS ? IE ? Service packs ?
Version of wininit.dll ?

 
Latest foundings are that code works on some computers and on some dont.
Non working confinguration:
win 2000 server 5.00.2195, sp4

IE 6.0.2800.1106
updates: SP1;Q330994;Q818529;Q822925;Q828750;Q824145

Msxml2.dll version: 8.2.8307.0

Working configuration:
win 2000 server; version 5.00.2195;sp4

IE 6.0.2800.1106
Updates: SP1;Q328970;Q324929;Q810847;Q813951;Q813489;Q330994;Q818529;Q822925;Q828750;Q824145
MSXML2.dll version: 8.2.8307.0

None of the updates on working machine are dealing with XML (some are comulative patches, one for proxy and MSN and one deailng with customization of Outlook Today.

Where can i find wininit.dll or its version?

One other thing i noticed: The msxml is leaking a lot of memory and after an hour of working with it I get "out of memory" message. If I check Task Manager at that point the memory usage is in normal bounds (ie: there is still enough physical and virtual memory).


T.

Tomi Hrovatin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top