Print Page | Close Window

CXTPCommandBars::InternalRelease Crash (12.0.1)

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11360
Printed Date: 15 November 2025 at 9:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPCommandBars::InternalRelease Crash (12.0.1)
Posted By: gautambjain
Subject: CXTPCommandBars::InternalRelease Crash (12.0.1)
Date Posted: 09 July 2008 at 7:43am

Hello Dear Support & Members,

I have been using older versions of XTP (9.6) which worked fine for the below code.

Yesterday I tried XTP version 12.0.1 and it crashes on CXTPCommandBars::InternalRelease call below.

Please help.


CXTPCommandBars* pCommandBars = (CXTPCommandBars*)CXTPCommandBars::CreateObject();
    if (pCommandBars)
    {
        pCommandBars->SetSite(this);
        pCommandBars->SetPaintManager(new CXTPOffice2003Theme());
        CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(pCommandBars);
        pPopupBar->LoadMenu(pSubMenu);

        if (pPopupBar)
        {
            pCommandBars->TrackPopupMenu(pPopupBar,             TPM_RETURNCMD|TPM_VCENTERALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON, posScreen.x, posScreen.y, this)
}

        
        pPopupBar->InternalRelease();
        pCommandBars->InternalRelease(); //CRASHES HERE
      
   }







Replies:
Posted By: Oleg
Date Posted: 09 July 2008 at 12:18pm
Hi,
 
Code looks good.    Can you show whole call stack of crush.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: gautambjain
Date Posted: 10 July 2008 at 2:25am

Here is the stack. CToolsDialog is the dialog box that shows the menu immediately on running the program (without any user interaction).


mfc90d.dll!CCmdTarget::OnFinalRelease()  Line 579 + 0x21 bytes C++
mfc90d.dll!CCmdTarget::InternalRelease()  Line 175    C++
PikyBasket.exe!CToolsDialog::ShowToolsMenu()  Line 307    C++
PikyBasket.exe!CPikyBasketApp::InitInstance()  Line 167    C++
mfc90d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f15, int nCmdShow=1)  Line 37 + 0xd bytes    C++
PikyBasket.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f15, int nCmdShow=1)  Line 30    C++
PikyBasket.exe!__tmainCRTStartup()  Line 574 + 0x35 bytes    C
PikyBasket.exe!WinMainCRTStartup()  Line 399    C





Posted By: Oleg
Date Posted: 10 July 2008 at 5:32am
Hello,
 
Just tried same code with new project - works fine.
 
Can you try reproduce it with new appliation also and attach it here.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net