skip to Main Content

I’m currently working with an ExtJS-based menu system and encountering an issue where the error STATUS_ACCESS_VIOLATION occurs when I click on a menu item after initially clicking on the main menu and reopening the sub-menu.

Here’s the scenario in detail:

First Click: Clicking the main menu opens the submenu without issues.
Subsequent Click: After closing the submenu, clicking the main menu again and then selecting a submenu item causes the STATUS_ACCESS_VIOLATION error.

Below is the code that sets up the menu structure and listens for click events:

javascript

var menuStructure = [];

// Sample Menu Structure
menuStructure.push({
    text: 'Main Menu 1', // Main menu item
    baseCls: 'gnb_menu_btn',
    margin: '0 15 0 0',
    hidden: false, // Controls the visibility of the menu item
    id: 'menu1', // Main menu item ID
    parentId: '0',
    padding: '20 0 20 0',
    menuAlign: 't-b?',
    expanded: true,
    menu: {
        xtype: 'menu', // Menu xtype
        cls: 'gnb_sub_box',
        plain: true,
        expanded: true,
        padding: 0,
        items: [
            {
                text: 'Sub Menu 1', // Sub menu item
                id: 'submenu1',
                listeners: {
                    click: function() {
                        console.log('Submenu 1 clicked');
                    }
                }
            },
            {
                text: 'Sub Menu 2', // Another sub menu item
                id: 'submenu2',
                listeners: {
                    click: function() {
                        console.log('Submenu 2 clicked');
                    }
                }
            }
        ]
    }
});

var tb = Ext.create('Ext.toolbar.Toolbar', {
    cls: 'nav_gnb',
    padding: '0',
    items: menuStructure
});

Problem:
When I click the main menu item (e.g., Main Menu 1), the sub-menu opens correctly. However, after closing the sub-menu and reopening it by clicking the main menu again, clicking on any submenu item (like Sub Menu 1 or Sub Menu 2) triggers a STATUS_ACCESS_VIOLATION error.

Steps Taken:
I’ve tried using showAt, destroy, and manually handling visibility, but the error still occurs when clicking submenu items after reopening the menu.
I checked if there are any issues with the menu’s configuration or event listeners but couldn’t resolve the error.

Questions:
Why does the error occur when clicking on submenu items after reopening the menu?
Are there any best practices for handling menu visibility and events in ExtJS to avoid this kind of error?
What might be causing the STATUS_ACCESS_VIOLATION error in this context?

Environment:
ExtJS Version: v6.2.0.981
Browser: Chrome 115
Operating System: Windows 10
Any guidance or suggestions on how to resolve this issue would be greatly appreciated!

anything.. bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

2

Answers


  1. We see the same thing. But we can trigger the issue in different ways. This started to happen when the browser updated. We tested rolling back to a previous version of Chrome and this seem to work.

    Login or Signup to reply.
  2. It’s always best to setup a fiddle to see if the problem only exists in your code or if this a sencha problem. I created a fiddle for you and it seems it does not show the problem.

    I added comments to all problematic parts in your code:

    https://fiddle.sencha.com/#view/editor&fiddle/3sk2

    A problem could be using IDs.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search