![]() |
DEBUG build crash in ~CXTThemeManager() |
Post Reply
|
| Author | |
MichaelN
Senior Member
Joined: 19 September 2006 Status: Offline Points: 112 |
Post Options
Thanks(0)
Quote Reply
Topic: DEBUG build crash in ~CXTThemeManager()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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 February 2007 at 1:13am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 December 2010 at 11:29pm |
|
Have you solved the problem? How make it ? |
|
![]() |
|
MichaelN
Senior Member
Joined: 19 September 2006 Status: Offline Points: 112 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 January 2011 at 11:50am |
|
No, and it happens sometimes, not other times.
|
|
![]() |
|
MichaelN
Senior Member
Joined: 19 September 2006 Status: Offline Points: 112 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 January 2011 at 11:53am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 January 2011 at 3:45am |
|
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 |