This issue duplicates another issue.
  1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    64
    Vote Rating
    6
    jim@carroll.net is on a distinguished road

      1  

    Default BUG FIX: src/tree/View.js (patch attached)

    BUG FIX: src/tree/View.js (patch attached)


    REQUIRED INFORMATION
    Ext version tested:
    • Ext 4.1.3
    Browser versions tested against:
    • Chrome 24.0.1312.57 m
    • IE 8.0.6
    • FF 18.0.2 (firebug 1.12.0a.2 installed)
    • Safari 5.1.7
    Description:Steps to reproduce the problem:
    • Create app with window that get's opened on button click
    • In the window, display a tree panel that is read from an ajax source
    • Run app, and open window, then close it.
    • Re-open Window.
    • Error from Chrome: Uncaught TypeError: Cannot call method 'indexOf' of null ext-all-dev.js:164027
    The full chrome stack trace is:

    1. Uncaught TypeError: Cannot call method 'indexOf' of null ext-all-dev.js:164027
    1. Ext.define.onBeforeFillext-all-dev.js:164027
    2. Ext.define.fireext-all-dev.js:14999
    3. continueFireEventext-all-dev.js:28029
    4. fireEventext-all-dev.js:28000
    5. Ext.define.fillNodeext-all-dev.js:96156
    6. Ext.define.onProxyLoadext-all-dev.js:96205
    7. Ext.define.processResponseext-all-dev.js:87982
    8. (anonymous function)ext-all-dev.js:88471
    9. Ext.apply.callbackext-all-dev.js:11434
    10. Ext.define.onCompleteext-all-dev.js:37132
    11. Ext.define.onStateChangeext-all-dev.js:37069
    12. (anonymous function)ext-all-dev.js:3000


    Possible fix:

    The solution requires a fix to Ext.tree.View (we have attached a patch with this report). Bottom line, the initComponent method of Ext.tree.View registers listeners using the unmanaged on() call for both it's own store and the treepanel's store. It should instead using the addManagedListner version -- ie: mon().

    What appears to be happening is that even AFTER the window containing the treepanel is closed, the 'beforefill' event handler is still registered. The second time the window is created, there are now two 'beforefill' event handlers, but the first registered handler refers to a view that is no longer valid. When the event fires, it try's to dereference a 'null' reference which causes the exception.

    Operating System:
    • Windows 7 Pro
    • Windows 2003 Server
    Attached Files

  2. #2

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    64
    Vote Rating
    6
    jim@carroll.net is on a distinguished road

      1  

    Default


    First -- I appreciate your taking the time to point out the DUPE to us. Much appreciated.

    But I must say, this is quite frustrating. We've spent three days tracking down a bug Sencha knew about in October? Can anyone at Sencha explain why this was not patched already ?! Or at least a strong warning in the docs on Tree panels to make sure developers knew the issue existed ?!

    Not to mention -- we posted to the forums yesterday reporting our problem and got back silence. We had to invest another day to find the source and post a patch -- and only then is the issue linked to a dupe !!

  4. #4
    Ext JS Premium Member
    Join Date
    Dec 2010
    Location
    Luxembourg
    Posts
    193
    Vote Rating
    2
    EAHC-IT is on a distinguished road

      0  

    Default


    Hi!
    @jim thanks for the patch, I have patched the ext-all-dev.js and the src/tree/view.js with success, just one question how do I patch the ext-all.js?

  5. #5
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    64
    Vote Rating
    6
    jim@carroll.net is on a distinguished road

      0  

    Default


    This issue is confirmed resolved in ExtJs 4.2 Sprint 2

    http://www.sencha.com/forum/showthre...-an-object-%28

    I recommend you download the latest ExtJs.

  6. #6
    Ext JS Premium Member
    Join Date
    Dec 2010
    Location
    Luxembourg
    Posts
    193
    Vote Rating
    2
    EAHC-IT is on a distinguished road

      0  

    Default


    Quote Originally Posted by jim@carroll.net View Post
    This issue is confirmed resolved in ExtJs 4.2 Sprint 2

    http://www.sencha.com/forum/showthread.php?255808-SERIOUS-BUG-reload-of-Ext.data.TreeStore-causes-TypeError-null-is-not-an-object-(

    I recommend you download the latest ExtJs.
    I downloaded the 4.2.0.628, did you find any issue moving from 4.1.3 to the latest?
    I have not much time for validating the 4.2 with my app, end of this month the app has to be bug free and ready for heavy use...

  7. #7
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    64
    Vote Rating
    6
    jim@carroll.net is on a distinguished road

      0  

    Default


    I had zero problems!

    Also the Sencha patch was superior to the approach I took with my patch (of course...that's why they get the big bucks).

  8. #8
    Ext JS Premium Member
    Join Date
    Dec 2010
    Location
    Luxembourg
    Posts
    193
    Vote Rating
    2
    EAHC-IT is on a distinguished road

      0  

    Default


    Quote Originally Posted by jim@carroll.net View Post
    I had zero problems!

    Also the Sencha patch was superior to the approach I took with my patch (of course...that's why they get the big bucks).
    Of course

    Do you have a web app (big? >30 windows, models and stores)

    I am going to try it, for the moment the production will use the -dev.js until I validate the 4.2 Sprint 2

    Thank you

Thread Participants: 2

Tags for this Thread