Hi Fabricio,

I have code that shows a window, and where the close event runs, there is an error I will show below. After that error, any attempt to re-show this window shows a blank window with only a slightly corrupted "Close" button at top left.

Here is how the window is instantiated, including the definition of the tree control from which it originates:

Ext.define('Paramit.view.tree.ProductTreeController', {
    extend: 'Ext.app.ViewController',
    alias: 'controller.bom-tree',

    requires: [
        'Paramit.store.PartClass',
        'Paramit.store.PartType',
        'Paramit.view.part.PartWindow',
        'Paramit.view.part.PartImport',
        'Paramit.view.part.costing.CostImport',
        'Paramit.view.part.FileUploadWindow',
        'Paramit.view.part.FilesWindow',
        'Paramit.view.octoPart.PartOcto',
        'Paramit.view.part.revision.RevisionForm',
        'Paramit.view.buyPartList.BuyPartList',
        'Paramit.store.OctoPartPriceList',
        'Paramit.view.po.poGrid',
        'Paramit.view.part.ItemChanges',
        'Paramit.view.editBom.BomTree',
        'Paramit.view.part.partIssues.PartIssueWindow',
        //'Paramit.view.part.costing.editCostWindow'


    ],
	...
	
	showTaskWindow: function () {
        let view = this.getView(),
            theItem = this.getView().selection;
        let partNo, revision;

        if (theItem) {
            partNo = theItem.get('partNo');
            revision = theItem.get('revision');

            this.winTask = view.add({
                xtype: 'part-issue-list',
                height: Ext.getBody().getViewSize().height * 0.9,
                width: Ext.getBody().getViewSize().width * 0.8,
                renderTo: Ext.getBody(),
                title: 'Task for Part# ' + partNo + (revision ? '  Rev: ' + revision : ''),
                viewModel: {
                    links: { theItem: theItem }
                },
                listeners: {
                    close: function () { /*Ext.getCmp('btnRefresh').click();*/
                        //var taskCount = this.getOpenTask(theItem.get('itemId'));
                        Ext.Ajax.request({
                            url: '../../api/bom/opentask?itemId=' + theItem.get('itemId'),
                            method: 'GET',
                            async: false,
                            scope: this,
                            success: function (response) {
                                result = Ext.JSON.decode(response.responseText);
                                var taskCount = result.data;
                                theItem.set('taskStatus', taskCount);
                            },
                            failure: function (err) {
                                Ext.Msg.alert("Error", err);
                            }
                        });
                     
                        this.destroy();
                    }
                }
            });

            this.winTask.center();
            this.winTask.show();
        } else {
            Ext.Msg.alert('Error', 'No part was selected');
        }


    },
The form shows and functions correctly, it's when it closes that things go wrong, specifically after the call to "this.destroy()."

After calling that, it goes wrong somewhere after this line in the ext.axd files:
Click image for larger version. 

Name:	Where it goes wrong.png 
Views:	77 
Size:	24.6 KB 
ID:	25384

And then errors out at this removeListeners function:
Click image for larger version. 

Name:	What goes wrong.jpg 
Views:	74 
Size:	88.3 KB 
ID:	25385

Interestingly, the "m" parameter when calling the removeListener event is undefined. This seems like it could be the culprit.

After that, any effort to show this window again only shows the corrupted version, and, more strangely, the tree view from which the "Tasks" window was opened no longer has a functioning context menu. I have tried setting "winTask" to undefined when reloading the window and also setting winTask.managedListers to [], but neither of these ideas worked to allow reshowing the window and, in any case, the right-click menu of the parent tree view is still broken.

Apparently the tree view had its events damaged along with the Tasks window.

Obviously, this is not somewthing I can reproduce in a sample app, we will need to troubleshoot and fix it in the actual app as we have done thus far with the other issues.

I'm pretty sure that this is an issue somewhere in a deprecated method call that worked fine in EXT 4.2.

I know I don't give you easy stuff to fix! My apologies!

Thanks, Bob Graham

For your information, below is the definition of the "part-issue-list" xtype referenced in the showTask function:

Ext.define('Paramit.view.part.partIssues.PartIssueWindow', {
    extend: 'Ext.window.Window',
    xtype: 'part-issue-list',
    alias: 'widget.part-issue-list',

    requires: [
          'Paramit.view.part.partIssues.PartIssueController',
          'Paramit.view.part.partIssues.PartIssueCreate',
          'Paramit.model.PartIssue',
          'Ext.layout.container.VBox',
          'Paramit.view.part.partIssues.RelatedIssue'

    ],

    controller: 'part-issues',

    height: Ext.getBody().getViewSize().height * 0.8,
    width: Ext.getBody().getViewSize().width * 0.8, 
    layout: 'fit',
    closable: true,
    maximizable: true,
    modal: true,
    
    items: [{

        xtype: 'tabpanel',
        id:'tbTask',
        items: [{
            xtype: 'panel'...