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.
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,
_UIInspectorSetFocusedWindowis called making the popup menu the inspector focus window.When clicking on a menu item, the event processing in
_UIWindowInputEventcalls 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_UIInspectorTableMessagewhich tries to accesselement->cClassName, whereelementis the destroyed popup menu window I believe.