Results 1 to 4 of 4

Thread: [4.1 RC3] Grid#applyState: NS_ERROR_INVALID_POINTER

    You found a bug! We've classified it as EXTJS-6012 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    36

    Default [4.1 RC3] Grid#applyState: NS_ERROR_INVALID_POINTER

    Hi, I am doing some stuff with Grid#applyState, but I get the following error from time to time:

    Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMDocumentFragment.appendChild]
    I could track down the error to Ext.grid.header.Container#moveHeader : this.onHeaderMoved is called with the wrong arguments, the colsToMove argument is missing. So instead of

    Code:
        moveHeader: function(fromIdx, toIdx) {
            // An automatically expiring lock
            this.tempLock();
            this.onHeaderMoved(this.move(fromIdx, toIdx), fromIdx, toIdx);
        },
    it should be something like

    Code:
        moveHeader: function(fromIdx, toIdx) {
            // An automatically expiring lock
            this.tempLock();
            this.onHeaderMoved(this.move(fromIdx, toIdx), 1, fromIdx, toIdx);
        },
    This is obvious bug, could you please fix it?

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791

    Default

    I couldn't reproduce the error you described but from inspection it does appear there's a mistake.

    In case there's any doubt here's a test case. Reorder the columns then reload the page. Note how the logged values are incorrect.

    Code:
    Ext.onReady(function() {
        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
    
        Ext.create('Ext.grid.Panel', {
            height: 300,
            renderTo: Ext.getBody(),
            stateful: true,
            stateId: 'my-grid',
            width: 302,
            columns: {
                items: [
                    {text: 'Column 1'},
                    {text: 'Column 2'},
                    {text: 'Column 3'}
                ],
                listeners: {
                    columnmove: function(ct, column, fromIdx, toIdx, opts) {
                        console.log('fromIdx: ' + fromIdx);
                        console.log('toIdx: ' + toIdx);
                    }
                }
            }
        });
    });

  3. #3
    Sencha Premium User d.zucconi's Avatar
    Join Date
    Jun 2008
    Location
    Piacenza (Italy)
    Posts
    102

    Default

    Quote Originally Posted by lacco View Post



    I could track down the error to Ext.grid.header.Container#moveHeader : this.onHeaderMoved is called with the wrong arguments, the colsToMove argument is missing. So instead of

    Code:
        moveHeader: function(fromIdx, toIdx) {
            // An automatically expiring lock
            this.tempLock();
            this.onHeaderMoved(this.move(fromIdx, toIdx), fromIdx, toIdx);
        },
    it should be something like

    Code:
        moveHeader: function(fromIdx, toIdx) {
            // An automatically expiring lock
            this.tempLock();
            this.onHeaderMoved(this.move(fromIdx, toIdx), 1, fromIdx, toIdx);
        },
    This is obvious bug, could you please fix it?
    + 1 !
    Still present in 4.1.0 final release... Why ?

  4. #4

    Default

    I am using Extjs 4.1.1 and I am seeing this issue too, when my grid attempts to restore re-ordered column state, after I re-order some columns in it.

    When is this expected to be fixed?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •