Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - [solved] Crash on exit since update 17.2 -> 18.0
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

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

 Post Reply Post Reply
Author
Message
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 58
Post Options Post Options   Thanks (1) Thanks(1)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post Topic: [solved] Crash on exit since update 17.2 -> 18.0
    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++



Back to Top
hakoar View Drop Down
Groupie
Groupie
Avatar

Joined: 06 August 2008
Location: Finland
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote hakoar Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 284
Post Options Post Options   Thanks (1) Thanks(1)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post 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();
}

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.141 seconds.