CXTPSingletonPointer access violation |
Post Reply |
Author | |
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(1)
Posted: 01 February 2016 at 4:02pm |
I've received a couple of crash reports from users since upgrading to XTP v17, and today I was lucky enough to reproduce it in debug mode. It's very hard to trigger this crash (seems to be random), but here's the stack trace:
ntdll.dll!RtlpWaitOnCriticalSection() Unknown ntdll.dll!RtlpEnterCriticalSectionContended() Unknown > FolderSizes.exe!CXTPSingletonPointer::GetInstance() Line 68 C++ FolderSizes.exe!CXTPSingleton<CXTPHookManager>::Instance() Line 119 C++ FolderSizes.exe!XTPHookManager() Line 346 C++ FolderSizes.exe!CXTPCommandBarsFrameHook::WinEventProc(CXTPWinEventHook::HWINEVENTHOOK__ * __formal, unsigned long event, HWND__ * hWnd, long idObject, long __formal, unsigned long __formal, unsigned long __formal) Line 114 C++ user32.dll!__ClientCallWinEventProc() Unknown ntdll.dll!KiUserCallbackDispatcherContinue() Unknown user32.dll!NtUserPeekMessage() Unknown user32.dll!PeekMessageW() Unknown combase.dll!PeekTillDone(HWND__ * hWnd) Line 595 C++ combase.dll!OXIDEntry::WaitForApartmentShutdown() Line 1525 C++ combase.dll!OXIDEntry::StopServer() Line 1451 C++ combase.dll!CComApartment::StopServer() Line 1424 C++ combase.dll!StopThread(int fHostThread) Line 2404 C++ combase.dll!ApartmentUninitialize(int fHostThread) Line 2621 C++ combase.dll!wCoUninitialize(COleTls & Tls, int fHostThread) Line 4050 C++ combase.dll!CoUninitialize() Line 3970 C++ FolderSizes.exe!CXTPComInitializer::~CXTPComInitializer() Line 1288 C++ FolderSizes.exe!CXTPComInitializer::`scalar deleting destructor'(unsigned int) C++ FolderSizes.exe!CXTPMarkupObject::~CXTPMarkupObject() Line 627 C++ FolderSizes.exe!CXTPMarkupType::~CXTPMarkupType() Line 390 C++ FolderSizes.exe!CXTPMarkupType::`scalar deleting destructor'(unsigned int) C++ FolderSizes.exe!CXTPMarkupObject::OnFinalRelease() Line 643 C++ FolderSizes.exe!CCmdTarget::InternalRelease() Line 177 C++ FolderSizes.exe!CXTPMarkupObject::Release() Line 649 C++ FolderSizes.exe!CXTPMarkupType::CClassList::~CClassList() Line 294 C++ FolderSizes.exe!`CXTPMarkupType::GetClassList'::`2'::`dynamic atexit destructor for 'list''() C++ FolderSizes.exe!_execute_onexit_table::__l22::<lambda>() Line 198 C++ FolderSizes.exe!__crt_seh_guarded_call<int>::operator()<void <lambda>(void),int <lambda>(void) & __ptr64,void <lambda>(void) >(__acrt_lock_and_call::__l3::void <lambda>(void) && setup, _execute_onexit_table::__l22::int <lambda>(void) & action, __acrt_lock_and_call::__l4::void <lambda>(void) && cleanup) Line 199 C++ FolderSizes.exe!__acrt_lock_and_call<int <lambda>(void) >(const __acrt_lock_id lock_id, _execute_onexit_table::__l22::int <lambda>(void) && action) Line 882 C++ FolderSizes.exe!_execute_onexit_table(_onexit_table_t * table) Line 222 C++ FolderSizes.exe!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 211 C++ FolderSizes.exe!exit(int return_code) Line 283 C++ FolderSizes.exe!__scrt_common_main_seh() Line 275 C++ FolderSizes.exe!__scrt_common_main() Line 309 C++ FolderSizes.exe!wWinMainCRTStartup() Line 17 C++ kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown At the point of crash within CXTPSingletonPointer::GetInstance(), the m_access member CRITICAL_SECTION is NULL (assumedly because it's been deleted), which I believe is why the access violation occurs. Never saw crashes anything like this with the XTP v16 code base, and would appreciate any feedback. - Mark R.
|
|
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
|
I found a way to reproduce this crash consistently, and doing so led me to a solution.
I have a CDialog window that is themed by deriving from CXTPCommandBarsFrameHook and calling EnableFrameTheme() from inside of OnInitDialog(). This dialog in turns uses CXTPTabControl to embed a series of other CDialog windows into tabs. One of those dialogs was ALSO deriving from CXTPCommandBarsFrameHook. Once that derivation was removed, this crash stopped occurring. It appears that this nesting of CXTPCommandBarsFrameHook-derived windows was confusing the window hook.
|
|
calvi
Groupie Joined: 20 March 2004 Location: United Kingdom Status: Offline Points: 43 |
Post Options
Thanks(0)
|
I too have received a report caused by the same issue, which I can't reproduce. This is the complete stack trace, which I submitted in a bug report:
ntdll.dll!RtlpWaitOnCriticalSection() Unknown This indicates that the main application has terminated, and statically allocated objects are being destroyed. The only explicit calls to the themes API are: XTPPaintManager()->SetTheme(xtpThemeVisualStudio2010); It may be significant that the customer's PC is unusually powerful: Intel 8 Processor i7-4790K CPU @ 4.00GHz, with 16G Ram |
|
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
Any solution to this problem?
-cpede
|
|
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|
calvi
Groupie Joined: 20 March 2004 Location: United Kingdom Status: Offline Points: 43 |
Post Options
Thanks(0)
|
Is this bug going to be fixed in v17.3?
|
|
guiuser1
Groupie Joined: 17 November 2015 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
I believe this issue will hit us also..
I have been trying to figure out a solution to themed CDialogs and I believe you have provided some interesting insight into this... Our apps are also Tab View based and your concerns will probably also hit us. We are testing v17.3 as we speak....trying to port our apps to CJ has been a task. Lot things work great but not everything. Unfortunately, the Tab views and themed dialogs is a big one for us as well. |
|
astoyan
Admin Group Joined: 24 August 2013 Status: Offline Points: 304 |
Post Options
Thanks(0)
|
Does anyone still have this issue after migration to 17.3? If so please provide details so that it's fixed for 18.0.
Regards, Alexander
|
|
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 |