![]() |
the XTPResourceManager()->Close(). |
Post Reply ![]() |
Author | |
roninda ![]() Groupie ![]() Joined: 23 March 2011 Status: Offline Points: 12 |
![]() ![]() ![]() ![]() ![]() Posted: 03 June 2011 at 8:42am |
I run into random access violation when my app exit.
After lots of debug, i add the XTPResourceManager()->Close() in the CMainframe::Close() and everything is ok. But i don't know why i should do this..... And so on , i use a lot external resource file .. Is this the reason? |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
yes, recommended call it on exit. maybe better in ExitInstance of your application.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Insad ![]() Groupie ![]() ![]() Joined: 28 October 2004 Location: The Netherlands Status: Offline Points: 55 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Should I call this in my DLLs as well?
And should it be called before or after the call to the ExitInstance of the baseclass?
Thus like this:
int CD4WinAppBaseEx::ExitInstance()
{ int iRet = __super::ExitInstance(); XTPResourceManager()->Close();
if (IsApplication()) {
g_strLatestSkinResourcepath.Empty(); CXTPSkinManager* pSkinMgr = XTPSkinManager();
if (pSkinMgr != NULL && pSkinMgr->IsEnabled()) { TRY { pSkinMgr->LoadSkin(NULL, NULL); } CATCH_ALL(e) { ASSERT(FALSE); // Whatever... } END_CATCH_ALL; } } else { CXTPPaintManager::Done(); XTPImageManager()->RemoveAll(); } return iRet;
} Or more like this:
int CD4WinAppBaseEx::ExitInstance()
{ XTPResourceManager()->Close(); int iRet = __super::ExitInstance(); if (IsApplication()) {
g_strLatestSkinResourcepath.Empty(); CXTPSkinManager* pSkinMgr = XTPSkinManager();
if (pSkinMgr != NULL && pSkinMgr->IsEnabled()) { TRY { pSkinMgr->LoadSkin(NULL, NULL); } CATCH_ALL(e) { ASSERT(FALSE); // Whatever... } END_CATCH_ALL; } } else { CXTPPaintManager::Done(); XTPImageManager()->RemoveAll(); } return iRet;
} Or maybe I am doing something else wrong?
Regards,
Insad
|
|
Products in use: XTP version 13.4.2/15.3.1/16.4.0/17.3.0
Platforms: Win2003(R2)/Win2008(R2)/Win7/Win2011/Win8(.1)/Win2012(R2)/Win10 (x86/x64) Langs: VC++ (MFC) 6/2005/2008/2013/2015/2017 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
both cases are fine.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Insad ![]() Groupie ![]() ![]() Joined: 28 October 2004 Location: The Netherlands Status: Offline Points: 55 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg,,
Thanks for your prompt reply.
But neither of the cases prevents a GPF from happening so possibly there is something else is failing in the code?
Can you help me with this or should I make another thread about it?
Regards,
Insad
|
|
Products in use: XTP version 13.4.2/15.3.1/16.4.0/17.3.0
Platforms: Win2003(R2)/Win2008(R2)/Win7/Win2011/Win8(.1)/Win2012(R2)/Win10 (x86/x64) Langs: VC++ (MFC) 6/2005/2008/2013/2015/2017 |
|
![]() |
|
jintian01 ![]() Newbie ![]() ![]() Joined: 10 December 2011 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
I have the same problem.When the Application exit with Non-Default Languge.
TOOLKITPRO1513VC60UD.DLL): 0xC0000005: Access Violation.will be happen.If I'm not annotation the SetLocale() Function;
|
|
![]() |
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 |