Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Skins and themes - crashing in CXTPSingletonPointe
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skins and themes - crashing in CXTPSingletonPointe

 Post Reply Post Reply
Author
Message
guiuser1 View Drop Down
Groupie
Groupie
Avatar

Joined: 17 November 2015
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote guiuser1 Quote  Post ReplyReply Direct Link To This Post Topic: Skins and themes - crashing in CXTPSingletonPointe
    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?


Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
guiuser1 View Drop Down
Groupie
Groupie
Avatar

Joined: 17 November 2015
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote guiuser1 Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.184 seconds.