CXTThemeManager Error |
Post Reply |
Author | |
Cheerios
Groupie Joined: 19 December 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Cheerios
Groupie Joined: 19 December 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
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 |
|
Cheerios
Groupie Joined: 19 December 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Best place to delete self is PostNcDestroy method
void CYourWnd::PostNcDestroy()
{ delete this; } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Cheerios
Groupie Joined: 19 December 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |