How do I shut down SkinManager |
Post Reply |
Author | |
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 885 |
Post Options
Thanks(0)
Posted: 05 October 2021 at 5:43pm |
I am trying to use Skinning in our app and am crashing while shutting down. When my frame window closes I call XTPShutdown. At that time, the ~CXTPSkinManager method gets called. During that call the ~XTP_SKINMANAGER_THREAD_STATE() function gets called but that is on another thread and not the thread on which I called XTPShutdown. The call to shutdown returns and my application proceeds to complete its shutdown via common_exit. The loader is unloading DLLs and a call to AfxOleUnlockApp is made. That code asserts and that leads to a message box being displayed. I end up in CXTPSkinManager::CbtFilterHook. This is on the main thread and it is the only thread still running. Nothing has set CXTPSkinManager::s_pInstance to nullptr. The manager appears to be a singleton and that is static instance data set when the manager is created. It is not set to null when the manager's destructor was called. The result is in CbtFilterHook, this line crashes us: pSkinManager->SetHook(hWnd, szClassName, lpcs, TRUE); Shouldn't the manager destructor null out that static pointer? ToolkitPro2010vc160x64UD.dll!00007ffc79a24e68() C++ > ToolkitPro2010vc160x64UD.dll!CXTPSkinManager::CbtFilterHook(int code, unsigned __int64 wParam, __int64 lParam) Line 819 C++ user32.dll!DispatchHookW() Unknown user32.dll!__fnHkINLPCBTCREATESTRUCT() Unknown ntdll.dll!KiUserCallbackDispatcherContinue() Unknown win32u.dll!NtUserCreateWindowEx() Unknown user32.dll!VerNtUserCreateWindowEx() Unknown user32.dll!InternalCreateDialog() Unknown user32.dll!InternalDialogBox() Unknown user32.dll!SoftModalMessageBox() Unknown user32.dll!MessageBoxWorker(struct _MSGBOXDATA *) Unknown user32.dll!MessageBoxTimeoutW() Unknown user32.dll!MessageBoxTimeoutA() Unknown user32.dll!MessageBoxA() Unknown JUtilD.dll!DisplayMessageBox(const wchar_t * lpszSubSystem, HWND__ * hWnd, const char * szText, const char * szCaption, unsigned int uType) Line 509 C++ JUtilD.dll!JThreadMessageBox(const wchar_t * lpszSubSystem, HWND__ * hWnd, const char * szText, const char * szCaption, unsigned int uType) Line 592 C++ JUtilD.dll!HRfatalmessageEx(const wchar_t * lpszSubSystem, const char * msg, const char * title) Line 263 C++ JUtilD.dll!HRassertMessage(const wchar_t * lpszSubSystem, unsigned long level, const char * lpszMessage, const char * lpszTitle) Line 327 C++ JUtilD.dll!HRCrtDbgReport(int reportType, char * lpszMessage, int * retVal) Line 476 C++ ucrtbased.dll!_VCrtDbgReportA(int nRptType, void * returnAddress, const char * szFile, int nLine, const char * szModule, const char * szFormat, char * arglist) Line 391 C++ ucrtbased.dll!_CrtDbgReport(int report_type, const char * file_name, int line_number, const char * module_name, const char * format, ...) Line 263 C++ mfc140ud.dll!AfxAssertFailedLine(const char * lpszFileName, int nLine) Line 317 C++ mfc140ud.dll!AfxOleUnlockApp() Line 62 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 |