leonid1
22 Jan 2010, 4:21 AM
After moving from 3.0 to 3.1 randomly , but very often two errors arises in our application. One of them is
Line: 1793
Error: 'Ext.elCache[...].events' is null or not an object
It arises either in Ext.EventManager.addListener method
function addListener(el, ename, fn, wrap, scope){
el = Ext.getDom(el);
var id = getId(el), es = Ext.elCache[id].events, wfn;
...
or in Ext.EventManager.removeListener method
removeListener : function(el, eventName, fn, scope){
el = Ext.getDom(el);
var id = getId(el), f = el && (Ext.elCache[id].events)[eventName] || [],
wrap, i, l, k, wf;
...
I can check id and it is not presented in Ext.elCache. At the same time both Ext.getCmd(id) and Ext.get(id) return objects (in addListener only Ext.get(id) returns while Ext.getCmd(id) is undefined). This error first occurs when I try to open or close a window, but then it may occur at any place.
Second error may arise when we try to open or close combobox in a grid. Here is it
Line: 1874
Error: 'fn.task' is null or not an object
It arises in Ext.EventManager.createBuffered method
function createBuffered(h, o, fn){
fn.task = new Ext.util.DelayedTask(h);
var w = function(e){
fn.task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]);
};
return w; };
At this moment fn is a function, but fn.task is undefined. This error may be achieved if we have two comboboxes in one grid and try to open both one after another or if we open and close a window and then try to open combobox (so may be second error is somehow tied to the first).
Seems that both errors are due to the new way of how GarbageCollector works.
Please, can't somebody suggest how can we fix this errors. I doubt it is easy to create a simple code to demonstrate them.
P.S. The first error I saw only in IE8, can't get it in FF, but the second saw both in IE and FF.
Line: 1793
Error: 'Ext.elCache[...].events' is null or not an object
It arises either in Ext.EventManager.addListener method
function addListener(el, ename, fn, wrap, scope){
el = Ext.getDom(el);
var id = getId(el), es = Ext.elCache[id].events, wfn;
...
or in Ext.EventManager.removeListener method
removeListener : function(el, eventName, fn, scope){
el = Ext.getDom(el);
var id = getId(el), f = el && (Ext.elCache[id].events)[eventName] || [],
wrap, i, l, k, wf;
...
I can check id and it is not presented in Ext.elCache. At the same time both Ext.getCmd(id) and Ext.get(id) return objects (in addListener only Ext.get(id) returns while Ext.getCmd(id) is undefined). This error first occurs when I try to open or close a window, but then it may occur at any place.
Second error may arise when we try to open or close combobox in a grid. Here is it
Line: 1874
Error: 'fn.task' is null or not an object
It arises in Ext.EventManager.createBuffered method
function createBuffered(h, o, fn){
fn.task = new Ext.util.DelayedTask(h);
var w = function(e){
fn.task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]);
};
return w; };
At this moment fn is a function, but fn.task is undefined. This error may be achieved if we have two comboboxes in one grid and try to open both one after another or if we open and close a window and then try to open combobox (so may be second error is somehow tied to the first).
Seems that both errors are due to the new way of how GarbageCollector works.
Please, can't somebody suggest how can we fix this errors. I doubt it is easy to create a simple code to demonstrate them.
P.S. The first error I saw only in IE8, can't get it in FF, but the second saw both in IE and FF.