Print Page | Close Window

Skins and themes - crashing in CXTPSingletonPointe

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23103
Printed Date: 23 December 2024 at 9:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Skins and themes - crashing in CXTPSingletonPointe
Posted By: guiuser1
Subject: Skins and themes - crashing in CXTPSingletonPointe
Date Posted: 19 August 2016 at 1:26pm
We awaited the v17.2 for quite sometime and are now testing codejock for our applications after a 8 month wait.

As such we have encountered additional issues when we switch themes and skins.  We had major issues with FileDialog with prior versions and hoped that v17.x took care of those and in fact they did...now we now have a program exit issue...

Here's a summary of the call stak...
    !CXTPSingletonPointer::GetInstance() Line 66    C++
     !CXTPSingleton<CXTPSystemVersion>::Instance() Line 119    C++
     !XTPSystemVersion() Line 204    C++
     !CXTPSkinManagerApiHook::CXTPSkinManagerApiHook() Line 119    C++
     !CXTPSkinManager::CXTPSkinManager() Line 347    C++
     !XTPSkinManager() Line 709    C++
     !CXTPSkinManagerApiHook::OnHookCloseThemeData(void * hTheme) Line 2443    C++
     !CXTPWinThemeWrapper::CloseThemeData() Line 134    C++
     !CXTPWinThemeWrapper::~CXTPWinThemeWrapper() Line 105    C++
     [External Code]   
     !CXTPButtonTheme::~CXTPButtonTheme() Line 78    C++
     [External Code]   
     !CXTPButton::~CXTPButton() Line 106    C++
     !CHTMLPrintDlg::~CHTMLPrintDlg() Line 31    C++
     [External Code]   
     !CDMApp::~CDMApp() Line 240    C++ - our exit call

All we are trying to do is switch skins and themes...and if we do so...the above happens.  We are trying to manage things similar to the SkinMDISample and GUI_VisualStudio samples and are running into issues.

We basically call:

   XTPSkinManager()->LoadSkin(...)
   setTheme(skins[nSkin].m_nTheme) - akin to the SkinMDISample
   OnSkinChanged(); - akin to the SkinMDISample

And our app always exists with the exception above.
Our builds are currently using vc2013 with v120_xp platform build tools.

Any ideas as to what to do?





Replies:
Posted By: olebed
Date Posted: 19 August 2016 at 5:20pm
Hello guiuser1,

Did your code work fine on exiting from application with previous versions of SkinFramework (17.1, 17.0, 16.4) ?

Regards,
 Lebed Oleksandr


Posted By: guiuser1
Date Posted: 19 August 2016 at 5:41pm
On 16.4 is crashed on exit with other exceptions as I recall.  That was 9 months ago and we took a break from porting due to our ...we never did get a very solid base to work with in our application.

I think we found a quirk!?  The following seems to have fixed the app exit exception...hmm...

CMainFrame::~CMainFrame()
{
   XTPSkinManager()->LoadSkin(NULL);
}

I would have figured that exiting would have called the destructor of XTPSkinManager(). Haven't look though it at that level.



Posted By: olebed
Date Posted: 20 August 2016 at 11:56am
Ha Smile , I thought about  this (call LoadSkin(NULL) in ~CMainFrame()). But I tried to exclude this call in several our skin samples  without  any errors on exiting. So I suggested that problem in some other place.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net