Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC
  New Posts New Posts RSS Feed - CXTThemeManager Error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedCXTThemeManager Error

 Post Reply Post Reply
Author
Message
Cheerios View Drop Down
Groupie
Groupie


Joined: 19 December 2006
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cheerios Quote  Post ReplyReply Direct Link To This Post Topic: CXTThemeManager Error
    Posted: 09 May 2009 at 10:14am
When exiting my application at run-time, I'm getting an error associated with the CXTThemeManager.  I actually never reference the XTThemeManager/XTThemeManager in any of the application code, so I'm not really sure how to resolve the issue.

The error only occurs on exit if I activate a CXTPPropertySheet dialog containing tabs during application run-time.  It crashes on the check ASSERT(m_factoryList.m_pHead == 0) on line 325 of XTThemeManager.cpp.

The call stack up to the error is below:

      >EdgeWise.exe!CXTThemeManager::~CXTThemeManager()  Line 325 + 0x21 bytes    C++
      >EdgeWise.exe!CXTThemeManager::`scalar deleting destructor'()  + 0x2b bytes    C++
      >EdgeWise.exe!CProcessLocalObject::~CProcessLocalObject()  Line 480 + 0x28 bytes    C++
      >EdgeWise.exe!CProcessLocal<CXTThemeManager>::~CProcessLocal<CXTThemeManager>()  + 0x2b bytes    C++
      >EdgeWise.exe!`dynamic atexit destructor for 'CXTThemeManager::m_sThemeManager''()  + 0x28 bytes    C++
      >EdgeWise.exe!doexit(int code=0, int quick=0, int retcaller=0)  Line 591    C
      >EdgeWise.exe!exit(int code=0)  Line 412 + 0xd bytes    C


I'd appreciate any insight into this problem.

Thanks!
Product: Xtreme ToolkitPro 2009 (13.0.0)
Platform: Windows Vista (64bit) - SP 1 (running CodeJock and program in 32bit mode)
Language: Visual C++ 2008
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2009 at 1:17am
Hi,
 
This ASSERT means you have some non destroyed object. Check maybe you create one with "new" and don't delete it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Cheerios View Drop Down
Groupie
Groupie


Joined: 19 December 2006
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cheerios Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2009 at 4:27am
Hi Oleg,

Thanks for your response.  I'm having a really hard time tracking down this bug.  I do create the tab dialog by way of a "new".  I tried your suggestion of deleting it versus merely destroying the window, but if I try to delete it, I get a heap free error instead.

One thing...I recently had to add a manifest condition to my stdafx.h file for any of the theme settings to take effect.  It was after this that I started getting this error.  Could this be the problem?  I did have a reference to include the afxcmn.h file (if necessary) in the stdafx.h file, but that wasn't working, so I added in the manifest part and that worked.  Just in case this might be the problem, I've included the stdafx.h includes and pragma comments that I'm using below:

//--------------------------------------------------------------------------------------------------------

#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>         // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#if (_MSC_VER > 1310)   // VS2005
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif

//--------------------------------------------------------------------------------------------------------


Thanks for all of your help!



Product: Xtreme ToolkitPro 2009 (13.0.0)
Platform: Windows Vista (64bit) - SP 1 (running CodeJock and program in 32bit mode)
Language: Visual C++ 2008
Back to Top
Cheerios View Drop Down
Groupie
Groupie


Joined: 19 December 2006
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cheerios Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2009 at 2:29pm
I actually tracked down a solution -- not a pretty one, but a solution nonetheless!  Like you mentioned, Oleg, I do need to delete the tab dialog since I initialized it with a "new".  Since the dialog is modeless, the only place I could track down to delete it is in its own OnDestroy() method.  At the very end, I just added in the line "delete this;" .  I'm sure there is a much more elegant way to do this, but this works for now.

Thanks!
Product: Xtreme ToolkitPro 2009 (13.0.0)
Platform: Windows Vista (64bit) - SP 1 (running CodeJock and program in 32bit mode)
Language: Visual C++ 2008
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2009 at 2:10am
Hi,
Best place to delete self is PostNcDestroy method
 
void CYourWnd::PostNcDestroy()
{
 delete this;
}
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Cheerios View Drop Down
Groupie
Groupie


Joined: 19 December 2006
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cheerios Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2009 at 10:22am
Works like a charm...Thanks!
Product: Xtreme ToolkitPro 2009 (13.0.0)
Platform: Windows Vista (64bit) - SP 1 (running CodeJock and program in 32bit mode)
Language: Visual C++ 2008
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.