![]() |
DEBUG build crash in ~CXTThemeManager() |
Post Reply ![]() |
Author | |
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() Posted: 14 February 2007 at 12:09pm |
Often, when our App exits (debug build), I get an Access Violation crash in XTThemeManager. The ASSERT fails in the destructor. Is this a known issue and is there a fix? See code pasted below: CXTThemeManager::~CXTThemeManager()
{ POSITION pos = m_mapDefaultFactories.GetStartPosition(); void* pThemeFactoryClass; CXTThemeManagerStyleFactory* pFactory = 0; while (pos) { m_mapDefaultFactories.GetNextAssoc(pos, pThemeFactoryClass, (void *&)pFactory); SAFE_DELETE(pFactory); } ASSERT(m_factoryList.m_pHead == 0);
m_factoryList.RemoveAll(); } |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
It means that you forget to destroy some object that use Themes - maybe button? Check what m_factoryList.m_pHead is, when it will appear.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
yangyanglei ![]() Newbie ![]() Joined: 01 December 2010 Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() |
Have you solved the problem? How make it ? |
|
![]() |
|
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() |
No, and it happens sometimes, not other times.
|
|
![]() |
|
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() |
One additional comment: I don't know why there is an ASSERT there, becuase the line after deletes all the theme objects anyway. Maybe a TRACE would have been better.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
This ASSERT shows that something wrong. - that ThemeManager is destroyed now, but you still have some button/control that exists. most easy way is to check what value m_pHead is - it will show what Factory is not destroyed. Most easy scenario to reproduce it is to create CXTButton dynamically (pButton = new CXTButton()) and never delete it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |