Print Page | Close Window

Exception when closing App

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=1440
Printed Date: 28 May 2025 at 5:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Exception when closing App
Posted By: sbinder
Subject: Exception when closing App
Date Posted: 22 November 2004 at 5:20am
Hello,

we are currently evaluating your Toolkit Pro for our Applications.
I only included XTPro Header in stdafx.h, and changed CMainFrame Base Class (and all occurances of FrameWnd) to "CXTFrameWnd". no use of any other XT Features atm.

The app works normally, but when i close it, i get an exception in (or after) CMainFrame destructor.

CallStack points here:
mfc71d.dll!CPlex::FreeDataChain()  + 0x1e    C++
(Code:
void CPlex::FreeDataChain()     // free this one and links
{
    CPlex* p = this;
    while (p != NULL)
    {
        BYTE* bytes = (BYTE*) p;
-->  CPlex* pNext = p->pNext;   // Fails Here!
        delete[] bytes;
        p = pNext;
    }
}

This is from "output-window":
An exception (first Chance) bei 0x7c22261e (mfc71d.dll) in lfpp32.exe: 0xC0000005: Zugriffsverletzung-Leseposition 0x00017c14.


Other components in use: Stingray Objective Grid Pro. from RogueWave, and CodeBase Database. both used as DLL.

can you point me to possible Problems, as i dont have the source code, i cant go into more detail.

Thanks,
Stefan Binder
Zeintlinger Systemtechnik



Replies:
Posted By: sbinder
Date Posted: 24 November 2004 at 2:59am
we accidently downloaded The XTToolkit 4.10 Demo, not the XTToolkit Pro 9.51 Demo, which is the one we would buy.

With XTPro there are no problems like the one mentioned before.


so no furhter help required.


Posted By: haiku
Date Posted: 30 November 2004 at 8:28am

I have just bought Xtreme Toolkit Pro v 9.51.  And problem still exists.

Exactly at the same place at "mfc71d.dll!CPlex::FreeDataChain()  + 0x1e    C++."

So any help would be appreciated.

 Thank you.



Posted By: haiku
Date Posted: 30 November 2004 at 1:09pm

Problem solved!

In my code I had:

CXTPImageManager m_imageManager;

CXTPShortcutBar m_wndShortcutBar;

The problem is that m_wndShortcutBar uses the m_imageManager. The first variable is destructed first by class' destructor, what causes error in m_wndShortcutBar's destructor. By simple reordering the variables in class the problem is solved.

Sorry for the created confusion.

Best regards, Haiku.

 




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