-
11 Jan 2013 3:03 AM #1
Ext.EventManager.removeFromSpecialCache() iterating past end of array error
Ext.EventManager.removeFromSpecialCache() iterating past end of array error
Tested version: Ext JS 3.4.0 and 3.4.1
Browsers: All
When "specialElCache.splice(i, 1);" removes an item from the "specialElCache" array, array length is no longer "len" and causes "TypeError: specialElCache[i] is undefined" (Firefox) when iterating past the end of the array.Code:removeFromSpecialCache: function(o) { var i = 0, len = specialElCache.length; for (; i < len; ++i) { if (specialElCache[i].el == o) { specialElCache.splice(i, 1); } } },
I am now using temporary fix:
Code:removeFromSpecialCache: function(o) { var i = 0, len = specialElCache.length, a=[]; for (; i < len; ++i) { if (specialElCache[i].el != o) { a.push(specialElCache[i]); } } specialElCache=a; },
-
11 Jan 2013 7:43 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 435
Thanks for the report! I have opened a bug in our bug tracker.
-
23 Apr 2013 6:54 AM #3
Any update on this bug? I'm getting it when I call destroy() on an Ext.Window component.
Padraig.
-
23 Apr 2013 7:05 AM #4
-
23 Apr 2013 8:52 AM #5
For me it happens when I've got 2 htmleditor components on the window and I call destroy() on the window. With only 1 htmleditor on the window, the error does not occur.
It happens on the 2nd call to
in the beforeDestroy() function of Ext.form.HtmlEditor()Code:Ext.EventManager.removeFromSpecialCache(doc);
Padraig.
You found a bug! We've classified it as
EXTJSIII-100
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote