Print Page | Close Window

[solved] Crash on exit since update 17.2 -> 18.0

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=23405
Printed Date: 29 April 2024 at 5:07am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [solved] Crash on exit since update 17.2 -> 18.0
Posted By: DavidH
Subject: [solved] Crash on exit since update 17.2 -> 18.0
Date 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++






Replies:
Posted By: hakoar
Date Posted: 03 August 2017 at 1:47pm
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.



Posted By: DavidH
Date Posted: 04 August 2017 at 11:36am
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.



Posted By: astoyan
Date Posted: 05 August 2017 at 2:54pm
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


Posted By: DavidH
Date Posted: 06 August 2017 at 4:16pm
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();
}




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