Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Debug assert in CExtPopupMenuWnd::MENUITEMDATA::GetCmdNode() Collapse All
Subject Author Date
BGC Dev Aug 27, 2008 - 5:05 AM


We have a menu that is causing the app to crash when a menu item is clicked for the second time.

The code is asserting in the following:

CExtCustomizeCmdTreeNode * CExtPopupMenuWnd::MENUITEMDATA::GetCmdNode()
#ifdef _DEBUG
    if( m_pCmdNode != NULL )
        ASSERT_VALID( m_pCmdNode );
#endif // _DEBUG
    return m_pCmdNode;

This is because m_pCmdNode has been rendered invalid after the call to m_ctrlShadow.DestroyWindow() in CExtPopupMenuWnd::_EndSequenceEx in the prior call.

Interestingly, this doesn’t assert during the first pass through this code and happens only the second time. Also it doesn’t assert if we have a breakpoint set here.

The call stack is as follows:

ProfUIS261md.dll!CExtPopupMenuWnd::MENUITEMDATA::GetCmdNode() Line 3202
ProfUIS261md.dll!CExtPopupMenuWnd::_EndSequenceEx(CExtPopupMenuWnd::MENUITEMDATA & mi={...}) Line 12692 + 0x8    
ProfUIS261md.dll!CExtPopupMenuWnd::_OnMouseClick(unsigned int nFlags=514, CPoint point={...}, bool & bNoEat=false) Line 12676
ProfUIS261md.dll!CExtPopupMenuSite::_HookMouseProc(int nCode=0, unsigned int wParam=514, long lParam=1244716) Line 1094 + 0x23

Any help would be greatly appreciated!

Thanks in advance. Cheers!

Technical Support Aug 27, 2008 - 11:52 AM

Could you provide more details? How to reproduce this crash with any of sample applications provided with Prof-UIS? Which menu crashes? The menu displayed from ribbon button? Or from a customizable toolbar or menu bar?