Hi all,
Found the solution to this and wanted to share that with you ;-) Everytime a new read was done on the layer through refreshing the refresh event triggered the update of the BBOX strategy. Here the abort was called on the protocol. In the protocol abort method the abort was propagated to the XMLHttpRequest. The abort method of the XMLHttpRequest propagated again to the XMLHttpRequest native object or the ActiveX object depending on the browser used. It seems that the abort is not working correctly if readystate has reached 4 already. So changing that to conditionally propagate the abort only when readystate > 0 and < 4 did the trick. Attached you'll find a patch file including this change and also: - Setting readystatechange function after open is called (as good practice from ajaxian.com: http://ajaxian.com/archives/reusing-xmlhttprequest-without-abort) - Applied changes from version 1.0.3 of the used library from http://code.google.com/p/xmlhttprequest Hope its usefull for anyone (and makes it into a new release). Cheers Kris From: Kris Geusebroek Sent: Monday, April 27, 2009 9:52 AM To: Kris Geusebroek; [email protected] Subject: RE: [OpenLayers-Users] Error when using XMLHTTPRequest (throughrefreshing a wfs layer every n seconds) Hi All, Some further investigating shows that the location of the error (unspecified error) is at line 1087 /29937 (for uncompressed openLayers.js) This is the line in XMLHTTPRequest.js where the this._object.send(vData) is called form cXMLHttpRequest.prototype.send In script debugeer I can see that this._aborted = true But nothing more strange things to see. Anybode knows how I can investigate more? Cheers Kris From: [email protected] [mailto:[email protected]] On Behalf Of Kris Geusebroek Sent: Monday, April 27, 2009 8:17 AM To: [email protected] Subject: [OpenLayers-Users] Error when using XMLHTTPRequest (throughrefreshing a wfs layer every n seconds) Hi all, When using openlayers to refresh my wfs layers frequently after some time using the application (zooming, panning etc while still refreshing every n seconds) I get an error: unknown error at line 977 (or 1076 sometimes). After that error the app becomes very unresponsive. Zooming in for example takes about 30 seconds after clicking the button in the PanZoom control. My feeling is that the error comes form the XMLHttpRequest code so I need to investigate that more. Anybody know a good help to investigate what goes wrong and to find out how to fix this? Environment is IE6 (I know bad choice). But the error also comes in Firefox but there the response times remain ok. Any help I much appreciated Cheers Kris Geusebroek Consultant Email: [email protected] <mailto:[email protected]> Tel: +31 (0)35 538 1921 Fax: +31 (0)35 538 1922 Mobile: +31 (0)6 30 697 223 http://www.xebia.com <http://www.xebia.fr/> Utrechtseweg 49 1213 TL Hilversum The Netherlands Xebia Blog ! http://blog.xebia.com/ <http://blog.xebia.com/> Xebia Podcast! http://podcast.xebia.com/ <http://podcast.xebia.com/>
<<image001.jpg>>
xmlhttprequest.patch
Description: xmlhttprequest.patch
_______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev
