Print Page | Close Window

Debug Error

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=6089
Printed Date: 18 July 2025 at 9:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Debug Error
Posted By: Acooper
Subject: Debug Error
Date Posted: 11 January 2007 at 3:28pm
Hello,

I am debugging an application using the debug version of XTPro (XTP9601Libd.dll).  When launching the application I get the following error:

Debug Error !
Program : App.exe
Module :
File : i386\chkesp.c
Line : 42
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

Here is the stack trace leading up to the error:

     MSVCRTD.DLL!__chkesp()  + 0x2e bytes   
     XTP9601Libd.dll!00ab62c1()    
     [Frames below may be incorrect and/or missing, no symbols loaded for XTP9601Libd.dll]   
     XTP9601Libd.dll!00b1528d()    
     XTP9601Libd.dll!00ad8bf4()    
     XTP9601Libd.dll!00ad7cdd()    
     XTP9601Libd.dll!00adcac1()    
     XTP9601Libd.dll!00adf1cc()    
     XTP9601Libd.dll!00adf2df()    
     XTP9601Libd.dll!00abdbcb()    
    App.exe!CMainFrame::OnCreate()  Line 97 + 0x21 bytes
     MFC42D.DLL!CWnd::OnWndMsg(unsigned int message=1, unsigned int wParam=0, long lParam=1239416, long * pResult=0x0012e754)  Line 1811 + 0xd bytes
     App.exe!CXTPFrameWndBase<CFrameWnd>::OnWndMsg() 
Line 198

Here is the contents of the OnCreate() method leading up to the error:

    CRect rcBar(0,0,0,0);
    CRect rcBorders(0,0,0,0);
   
    if (CXTPFrameWnd::OnCreate(lpCreateStruct) == -1)
        return -1;

    // Create Status bar.
    // Important: All control bars including the Status Bar
    // must be created before CommandBars....
    if (!m_wndStatusBar.Create(this) ||
        !m_wndStatusBar.SetIndicators(indicators,
        sizeof(indicators)/sizeof(UINT)))
    {
        TRACE0("Failed to create status bar\n");
        return -1;      // fail to create
    }

    // Initialize the command bars
    if (!InitCommandBars())
        return -1;

    // Get a pointer to the command bars object.
    CXTPCommandBars* pCommandBars = GetCommandBars();
    if(pCommandBars == NULL)
    {
        TRACE0("Failed to create command bars object.\n");
        return -1;      // fail to create
    }

    // Add the menu bar
    CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME);

Calling the SetMenu() method is what causes the error.  Note that this does not occur when running the application in Release mode.

Thanks in advance.



Replies:
Posted By: sserge
Date Posted: 11 January 2007 at 4:05pm
Hi,

This problem appears if you use another version/compiler for ToolkitPro dll.

If you was using evaluation version, remove it and use only purchased one.

Also delete all old Debug files. Totally clean development  folders.

--
WBR,
Serge



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