1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    17
    Vote Rating
    0
    franksencha is on a distinguished road

      0  

    Question Answered: 'Ext.fly(...)' is null or not an object

    Answered: 'Ext.fly(...)' is null or not an object


    I got following errors on IE 8. Please help!
    Thanks in advance,
    Frank



    Message: 'Ext.fly(...)' is null or not an object
    Line: 11386
    Char: 13
    Code: 0
    URI: http://extjs.cachefly.net/ext-4.0.2a/ext-all-debug.js

    Message: 'Ext.fly(...)' is null or not an object Line: 11386 Char: 13 ext-all-debug.js

  2. I've submitted a bug report here:

    http://www.sencha.com/forum/showthread.php?175372

    That thread includes details of my attempts to debug this problem, including a patch.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,510
    Answers
    528
    Vote Rating
    288
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    That line is deep in the event handling mechanism, it could be caused by just about anything.

    Hit F12 to load the debugger. Inspect the call stack to try to get a sense for what exactly what was going on. Inspect the variables to see if there are any hints there too.

    If that doesn't help, try commenting out sections of your code to isolate exactly which part induces the error.

    Upgrading to 4.0.7 may also be worth a quick try.

    When asking a question about a specific browser (IE8 in this case) it's always worth mentioning which other browsers you've tried. It can be enlightening to know that it works in FF, IE7, IE9, etc.

  4. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    17
    Vote Rating
    0
    franksencha is on a distinguished road

      0  

    Default


    It happened only for IE. At least don't have any impact for FF and Chrome.
    The error keeps popup on the screen when mouse moves. and not only happens on mouse moving, but also on other time or keys.

    The application is pretty big with more than 10000 lines for that single page/screen. so almost no way to comment out or take more time to solve unrelated problems come out.
    try v4.0.7 ? Here's the error but on the deffent lines comparing to v4.0.2a
    --------------------------------------------------------------------
    Webpage error detailsUser Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; .NET4.0C; .NET4.0E)
    Timestamp: Wed, 21 Dec 2011 14:53:20 UTC

    Message: 'Ext.fly(...)' is null or not an object
    Line: 11824
    Char: 13
    Code: 0
    URI: http://..../ext-all-debug.js

    Message: 'Ext.fly(...)' is null or not an object
    Line: 11824
    Char: 13
    Code: 0

  5. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,510
    Answers
    528
    Vote Rating
    288
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    One thought that occurs, do you have an element (or component) with a crazy id?

    You're going to have to step in with the debugger. There's a good chance it'll be easy to figure out what's going on if you inspect the variables and the stacktrace.

  6. #5
    Sencha User
    Join Date
    Oct 2011
    Posts
    17
    Vote Rating
    0
    franksencha is on a distinguished road

      0  

    Default


    1. update to version 4.0.7 have no help for this bug. (updated)
    2. this is a type of event/event bubble/event chain bug and debug event driven bug has few help to find it(if you have any good IE debug tool please recommend)
    3. crazy Id may not a case because there's no issue with FF and Chrome.

    Thanks.
    Last edited by franksencha; 3 Jan 2012 at 6:13 AM. Reason: edit

  7. #6
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,510
    Answers
    528
    Vote Rating
    288
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Given your problem is with just IE8, you should quickly check you don't have any stray commas.

    Quote Originally Posted by franksencha View Post
    1. update to version 2.0.7 have no help for this bug.
    I assume you mean 4.0.7.

    Quote Originally Posted by franksencha View Post
    2. this is a type of event/event bubble/event chain bug and debug event driven bug has few help to find it(if you have any good IE debug tool please recommend)
    The debugger built in to IE8/9 should be sufficient to dig in to this. Try walking back up through the call stack and inspect the variables and function arguments along the way, see what you find. Somewhere along the line you're ending up with a null or undefined where you shouldn't be, probably right near the top of the stack.

  8. #7
    Sencha User
    Join Date
    Oct 2011
    Posts
    26
    Vote Rating
    1
    xuzicn is on a distinguished road

      0  

    Default


    Meet the same problem in IE 7 & 8. Didn't test in IE 9

    Call stack is too simple and I don't think it is valuable:
    JScript anonymous
    anonymous
    wrap

    I am using ext 4.0.7. Script stop at ext-all-debug.js row 11824
    this.target is null thus Ext.fly returns a null value.

  9. #8
    Sencha User
    Join Date
    Oct 2011
    Posts
    26
    Vote Rating
    1
    xuzicn is on a distinguished road

      0  

    Default


    Here comes updated info.

    I tracked a function which is built by Ext.functionFactory in Ext.EventManager.createListenerWrap, this function leads this error:
    Code:
    function anonymous(e, options, fn, scope, ename, dom, wrap, args) {
    var Ext=window.ExtBox1;if(!Ext) {return;}
    e = Ext.EventObject.setEvent(e);
    var t = e.getTarget(".x-resizable-handle", this);
    if(!t) {return;}
    fn.call(scope || dom, e, t, options);
    }
    I noticed that sometimes e.srcElement is null so EventManager cannot find the event source. Below code helps to avoid this issue but I am not sure this change will affect other events or not:
    Code:
    Ext.EventObjectImpl.prototype.getTarget = function (selector, maxDepth, returnEl) {
        if (this.target == null) return null;
        if (selector) {
            return Ext.fly(this.target).findParent(selector, maxDepth, returnEl);
        }
        return returnEl ? Ext.get(this.target) : this.target;
    };

  10. #9
    Sencha User
    Join Date
    Oct 2011
    Posts
    17
    Vote Rating
    0
    franksencha is on a distinguished road

      0  

    Default


    Thanks and Agreed. Any comments from Sencha experts?
    If that's a proper fix, please confirm and hope it could be in upcoming updated version.

  11. #10
    Sencha User
    Join Date
    Oct 2011
    Posts
    17
    Vote Rating
    0
    franksencha is on a distinguished road

      0  

    Default comments from skirtle or Sencha experts ?

    comments from skirtle or Sencha experts ?


    ------------------------------