View Full Version : [FIXED] App freezes when an incorrect query is passed to Ext.app.Controller.control()

1 Nov 2011, 7:55 AM
Ext version:
Chrome, Chromium, FF
The complete page can freeze when an incorrect component query is passed to Ext.app.Controller.control()
Steps to recreate the problem:

Insert an incorrect component query into control()
When continueing working in the application it can freeze at complete unrelated points in the code. (Most likely because another event occurs at that point)
Expected result:
The faulty query is either silently ignored or an warning/error is generated


Ext.define('ecms.controller.Headers', {
extend: 'Ext.app.Controller',

init: function() {
'headerform button[action=cancel]]': { //note the double "]"
click: this.onCancelClick
'headerform button[action=cancel], headerform button[action=add]': {
// an intinuative mistake seen before when the programmer is working with css as well
click: this.onAnyClick



1 Nov 2011, 8:05 AM
"Working" example: http://jsfiddle.net/WpD9C/13/

Click the expand/collapse +sign to freeze your tab. This is caused by the extra "]" in the component query in controller.control().

This fiddle is using 4.0.2a, but the result is the same.

Warning: this example will crash your browser (IE), or freeze your tab (real browsers ;))

10 Nov 2011, 9:18 AM

To be honest I was hoping for an response from the dev's. Would they qualify this as a bug? And if not, should it be a feature request?

Personally I think this needs addressing

11 Nov 2011, 7:26 AM
Thanks for the report.

Indeed, the query parser needs some 'hardening'.

If you stop execution of the jsFiddle sample (thx @danlib) with the Chrome debugger after trying to collapse the tree, you can see it's stuck trying to figure out what to do with the final ']'.

29 Jun 2012, 3:11 AM
Thanx for the report! My browser froze and I didn't knew why. Then I read this and yes.. It was an incomplete CQ.