Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Crash (access violation) on application close
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Crash (access violation) on application close

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


Joined: 02 February 2007
Status: Offline
Points: 79
Post Options Post Options   Thanks (0) Thanks(0)   Quote SvenC Quote  Post ReplyReply Direct Link To This Post Topic: Crash (access violation) on application close
    Posted: 14 June 2007 at 8:45am
Hi,
 
when I debug an application where I use the report control from a regular dll (I defined XT_INIT_BY_REGULAR_DLL and call XTFuncInitDLL) built with VS2005 SP1 and toolkit version 11.1.0 I get an access violation when the app is closing.
 
It happens in the destructor of CXTPPaintManager. It seems that an explicit XTFuncExitDLL call might be useful to explicitly uninitialize the toolkit.
 
Any ideas? Here is the call stack:
 
> mfc80d.dll!AfxImageList_Destroy(_IMAGELIST * himl=0x08047508)  Line 40 + 0x12 bytes C++
  mfc80d.dll!CImageList::DeleteImageList()  Line 1333 C++
  mfc80d.dll!CImageList::~CImageList()  Line 1309 + 0xb bytes C++
  ToolkitPro1110vc80DR.dll!XTPPaintThemes::CXTPOffice2003Theme::~CXTPOffice2003Theme()  Line 66 + 0xe bytes C++
  ToolkitPro1110vc80DR.dll!XTPPaintThemes::CXTPOffice2003Theme::`vector deleting destructor'()  + 0x6c bytes C++
  mfc80d.dll!CCmdTarget::OnFinalRelease()  Line 579 + 0x21 bytes C++
  mfc80d.dll!CCmdTarget::InternalRelease()  Line 175 C++
  ToolkitPro1110vc80DR.dll!CXTPPaintManager::Done()  Line 276 C++
  ToolkitPro1110vc80DR.dll!CXTPPaintManager::CPaintManagerDestructor::~CPaintManagerDestructor()  Line 65 C++
  ToolkitPro1110vc80DR.dll!`dynamic atexit destructor for '__xtpPaintManagerDestructor''()  + 0x28 bytes C++
  ToolkitPro1110vc80DR.dll!_CRT_INIT(void * hDllHandle=0x03f50000, unsigned long dwReason=0, void * lpreserved=0x00000001)  Line 420 C
  ToolkitPro1110vc80DR.dll!__DllMainCRTStartup(void * hDllHandle=0x03f50000, unsigned long dwReason=0, void * lpreserved=0x00000001)  Line 512 + 0x11 bytes C
  ToolkitPro1110vc80DR.dll!_DllMainCRTStartup(void * hDllHandle=0x03f50000, unsigned long dwReason=0, void * lpreserved=0x00000001)  Line 462 + 0x11 bytes C
  ntdll.dll!_LdrpCallInitRoutine@16()  + 0x14 bytes 
  ntdll.dll!_LdrShutdownProcess@0()  - 0x51 bytes 
  kernel32.dll!77e668a3()  
 
 
--
SvenC
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2007 at 5:04am
Hello,
 
try call
 
CXTPPaintManager::Done() in ExitInstance of your CApp.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
SvenC View Drop Down
Groupie
Groupie


Joined: 02 February 2007
Status: Offline
Points: 79
Post Options Post Options   Thanks (0) Thanks(0)   Quote SvenC Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2007 at 3:20am
Hi oleg,
 
I added the Done call and the access violation is gont.
 
Thanks a lot,
Sven
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.