[solved] Crash on exit since update 17.2 -> 18.0 |
Post Reply |
Author | |
DavidH
Groupie Joined: 24 March 2007 Status: Offline Points: 59 |
Post Options
Thanks(1)
Posted: 03 August 2017 at 1:17pm |
Today I tried to upgrade my application from version 17.2 to version 18.0.1 of the CodeJock Toolkit.
I'm using Microsoft Visual Studio Community 2017, version 15.2. I statically link to the Unicode Debug Win32 version of the Codejock library, built using the default Deploy tool. In the debug version, I consistently get an error on exit that did not exist prior to the upgrade. See the stack trace below. In the release build, I get this problem at random (not reproducable). In version 17.2 I never had this problem, but when searching the forum, this seems to have been a problem before. What can I do to help to resolve this? 00000000() Unknown [Frames below may be incorrect and/or missing] > MyApp.exe!CCmdTarget::InternalRelease() Line 168 C++ MyApp.exe!CXTPMarkupObject::Release() Line 653 C++ MyApp.exe!CXTPMarkupPropertyMetadata::~CXTPMarkupPropertyMetadata() Line 158 C++ [External Code] MyApp.exe!CXTPMarkupDependencyProperty::~CXTPMarkupDependencyProperty() Line 188 C++ [External Code] MyApp.exe!CXTPMarkupObject::OnFinalRelease() Line 647 C++ MyApp.exe!CCmdTarget::InternalRelease() Line 177 C++ MyApp.exe!CXTPMarkupObject::Release() Line 653 C++ MyApp.exe!CXTPMarkupPropertyFromNameMap::~CXTPMarkupPropertyFromNameMap() Line 99 C++ MyApp.exe!CXTPSingleton<CXTPMarkupPropertyFromNameMap>::Destroy(void * ptr) Line 112 C++ MyApp.exe!CXTPSingletonPointer::Destroy() Line 105 C++ MyApp.exe!CXTPSingletonPointer::~CXTPSingletonPointer() Line 55 C++ [External Code] MyApp.exe!_execute_onexit_table::__l2::<lambda>() Line 206 C++ MyApp.exe!__crt_seh_guarded_call<int>::operator()<void <lambda>(void),int <lambda>(void) &,void <lambda>(void) >(__acrt_lock_and_call::__l2::void <lambda>(void) && setup, _execute_onexit_table::__l2::int <lambda>(void) & action, __acrt_lock_and_call::__l2::void <lambda>(void) && cleanup) Line 204 C++ MyApp.exe!__acrt_lock_and_call<int <lambda>(void) >(const __acrt_lock_id lock_id, _execute_onexit_table::__l2::int <lambda>(void) && action) Line 912 C++ MyApp.exe!_execute_onexit_table(_onexit_table_t * table) Line 160 C++ MyApp.exe!common_exit::__l2::<lambda>() Line 211 C++ MyApp.exe!__crt_seh_guarded_call<void>::operator()<void <lambda>(void),void <lambda>(void) &,void <lambda>(void) >(__acrt_lock_and_call::__l2::void <lambda>(void) && setup, common_exit::__l2::void <lambda>(void) & action, __acrt_lock_and_call::__l2::void <lambda>(void) && cleanup) Line 225 C++ MyApp.exe!__acrt_lock_and_call<void <lambda>(void) >(const __acrt_lock_id lock_id, common_exit::__l2::void <lambda>(void) && action) Line 912 C++ MyApp.exe!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 186 C++ MyApp.exe!exit(int return_code) Line 278 C++ |
|
hakoar
Groupie Joined: 06 August 2008 Location: Finland Status: Offline Points: 21 |
Post Options
Thanks(0)
|
I have same problem with my application. It started to crash in application exit after application was compiled against version 18? And it's also statically linked 64-bit Unicode app.
With version 17 I had no no problems. |
|
DavidH
Groupie Joined: 24 March 2007 Status: Offline Points: 59 |
Post Options
Thanks(0)
|
I'm glad to hear I'm not the only one!
I'm using: - Command Bars (Ribbon) - Docking Pane - Report Control - Controls Perhaps this helps to narrow down the issue. |
|
astoyan
Admin Group Joined: 24 August 2013 Status: Offline Points: 303 |
Post Options
Thanks(1)
|
Try to derive your application from from CXTPWinApp or call XTPShutdown from your Existinstance implementation right before returning from the method. Let me know if it helps.
Regards, Alexander
|
|
DavidH
Groupie Joined: 24 March 2007 Status: Offline Points: 59 |
Post Options
Thanks(0)
|
Alexander, that indeed seems to fix it! Thanks.
I derived MyApp from CXTPWinApp instead of CWinApp, and changed the ExitInstance function: int MyApp::ExitInstance() { // Save the current state for toolbars and menus. ..... // return CWinApp::ExitInstance(); // changed to: return CXTPWinApp::ExitInstance(); } |
|
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
Just a small trick to be more flexible when calling base class:
__super::ExitInstance();
|
|
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|
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 |