[16.3; VS2012] SkinM. Access violation upon exit |
Post Reply |
Author | ||
SMaton
Groupie Joined: 04 May 2009 Status: Offline Points: 12 |
Post Options
Thanks(0)
Posted: 20 March 2014 at 10:17am |
|
I have a problem upon exiting my application (in debug mode). It's related to the SkinManager which seems to get accessed after the SkinManager instance has been deleted. On exiting the application, this error is launched:
Hitting break leads to the function GetMetrics() of CXTPSkinManagerSchema. One step higher, I'm in CXTPSkinManager::GetMetrics() and even one step higher I'm in CXTPSkinManagerApiHook::OnHookDeleteObject(). Now, this function is called upon exiting the application (callstack via CCmdTarget::OnFinalRelease()). It shows that XTPSkinManager() returns a "valid" pointer, which in fact is a singleton instance. Further debugging and placing a breakpoint in the destructor of the CXTPSkinManager, it shows that it's actually destructed BEFORE the CXTPSkinManagerApiHook::OnHookDeleteObject() has been called.
The destructor looks like this:
It's clear that either the destruction should be called much later OR that the s_pInstance should be set to NULL. I've tried latter solution but this leads to memory leaks, since a new SkinManager instance is created via XTPSkinManager()->GetMetrics() in CXTPSkinManagerApiHook::OnHookDeleteObject() which is then not deleted anymore. Did you solve this bug?
|
||
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 |