gf icon indicating copy to clipboard operation
gf copied to clipboard

`UIInspector` accesses freed memory

Open greg7mdp opened this issue 1 year ago • 0 comments

If you enable UI_DEBUG, there is a nice inspector showing info on the window hierarchy.

When opening a popup menu and moving the mouse into it, _UIInspectorSetFocusedWindow is called making the popup menu the inspector focus window.

When clicking on a menu item, the event processing in _UIWindowInputEvent calls the menuitem callback, the popup menu is destroyed, and ends up calling _UIUpdate(), which refreshes all the toplevels, including the inspector window which ends up calling _UIInspectorTableMessage which tries to access element->cClassName, where element is the destroyed popup menu window I believe.

greg7mdp avatar Dec 25 '24 03:12 greg7mdp