[OpenLayers-Users] Re: SOLVED - Firefox nsIXMLHttpRequest.send throwing 0xc1f30001 (NS_ERROR_NOT_INITIALIZED)

Andrey andrey.aniskovets at gmail.com
Wed May 11 05:30:12 EDT 2011


On 05/11/2011 08:07 AM, Eric Lemoine wrote:
> On Tuesday, May 10, 2011, flexer<Andrey.Aniskovets at gmail.com>  wrote:
>> I have got the same error (Exception... "Component returned failure code:
>> 0xc1f30001 .... )
>> And I have found another solution:
>>
>> Do NOT call "this._object.send(vData);"
>> if  "this._object.abort();" has been called (see XMLHttpRequest.js).
>>
>> -----------------------
>> Look at Request.js:
>>              window.setTimeout(function(){
>>                  if (request._aborted !== true) {
>>                      request.send(config.data);
>>                  }
>>              }, 0);
>>
>> and look at XMLHttpRequest.js :
>>      cXMLHttpRequest.prototype.send    = function(vData) {
>>          // Add method sniffer
>>          if (cXMLHttpRequest.onsend)
>>      ....
>>
>> and look at XMLHttpRequest.js:
>>     cXMLHttpRequest.prototype.abort    = function() {
>>          ....
>>          // BUGFIX: Gecko - unnecessary DONE when aborting
>>          if (this.readyState>  cXMLHttpRequest.UNSENT)
>>              this._aborted    = true;
>>          this._object.abort();
>>          ....
>> -----------------------
>>
>> I have added to XMLHttpRequest.js these lines and the problem was solved:
>>
>>      cXMLHttpRequest.prototype.send    = function(vData) {
>>          if (!!this._isAbortCalled)
>>              return;
>>          ....
>>
>>      cXMLHttpRequest.prototype.abort    = function() {
>>          this._isAbortCalled    = true;
>>          ....
>>
>> ---------------------
>> I.e.
>>        try { this._object.send(vData); } catch (e) {}
>> looks like a workaround.
>> What do you think?
>> Could you check my changes on your system if it solves your problem?
> Hi
>
> Is the problem reproducible on one of the OpenLayers examples?
> (http://www.openlayers.org/dev/examples)
>
> What version of OpenLayers do you use? Do you have the problem with
> OpenLayers trunk?
>
> XMLHttpRequest.js already includes a state variable to know if abort()
> has been called, namely _aborted. But abort() sets _aborted to true
> only if the XHR status is greater than UNSET. Could you try to have
> abort() unconditionally set _aborted to true and see if that fixes it?
> Thanks.
>
Hi
-------
It looks like the problem is reproducible here : 
http://www.openlayers.org/dev/examples/getfeature-wfs.html  :
POST 
http://www.openlayers.org/dev/examples/proxy.cgi...p%3A%2F%2Fv2.suite.opengeo.org%2Fgeoserver%2Fows
POST 
http://www.openlayers.org/dev/examples/proxy.cgi?url=http%3A%2F%2Fv2.suite.opengeo.org%2Fgeoserver%2Fows

Aborted

OpenLayers.js (line 969)

- that is from Firebug console.
- there is ".send..." method;
  then I have manually wrap "this._object.send(this._data);" with  
"try{..}catch(e){alert(e)}"  and have got this exception :
[Exception... "Access to restricted URI denied"  code: "1012" nsresult: 
"0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: 
"file:///media/TMP/tmp_shara/OL-ex/getfeature-wfs_files/OpenLayers.js 
Line: 11177"]
So seems I have done something wrong.
-------
We use 2.10 (stable) version of OpanLayer.
-------
The problem occurred right in the case XHR status is NOT greater then 
UNSENT (on abort() call).

I have removed my fix and have commented this line:
    if (this.readyState > cXMLHttpRequest.UNSENT)
- this also fixes the problem: checked on FF3.6.17+ubuntu; 
F3.6.17+winXP; IE8+winXP ;
- BUT that line is marked as "BUGFIX" !
  - I have also found a strange side effect at IE (! but NOT at FF) 
(after commenting that line) : ... but seems that is completely another 
problem and most probably it does NOT relate to current ticket: 
"this.blocks.length" is null or not an object Framed.js, line:140 
character 24

Thanks.


More information about the Users mailing list