Asserts in 24.0 beta |
Post Reply |
Author | |
rconn
Groupie Joined: 16 May 2007 Location: United States Status: Offline Points: 77 |
Post Options
Thanks(0)
Posted: 19 May 2024 at 5:30pm |
All of my apps are now asserting when compiled under the 24.0 beta:
int CXTPApplication::GetComInitFlags() const { _ASSERTE(NULL != m_pComInit); return m_pComInit->GetInitFlags(); } They work with 22.1. I'm calling AfxOleInit before the XTP code is called; is there something else that needs to be done w/24.0?
|
|
astoyan
Admin Group Joined: 24 August 2013 Status: Offline Points: 306 |
Post Options
Thanks(0)
|
In order to allow ToolkitPro to use COM/OLE during its initialization and to provide a way to have a consistent COM/OLE initialization methods for all application threads, the new ToolkitPro v24 initializes it itself from CXTPWinApp constructor. The new CXTPWinApp::CXTPWinApp constructor now takes an optional argument of XTPComInit enumeriation type. If no argument is provided that the default xtpComInitAfxOle is used. For more other COM/OLE initalization methods refer to XTPComInit documentation. For example: class CMyApp : CXTPWinApp { CMyApp() : CXTPWinApp(xtpComInitAfxOle) { ... } ... } class CMyThread : CWinThread { virtual BOOL Run() { CXTPComInitializer comInit(xtpComInitAfxOle); ... } } Regards, Alexander
|
|
essess
Newbie Joined: 25 June 2023 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
In version 19.3.0 we call CXTPPaintManager::SetTheme(...) inside dynamically loaded DLLs to set the same Toolkit Pro theme as the main thread.
Now in v24.0.0.042924 (beta 1) we get the same assert and crash as rconn in GetComInitFlags: XTPApplication.cpp:
Continuing from the assert causes a crash at the location: XTPSystemHelpers.h: AFX_INLINE int CXTPComInitializer::GetInitFlags() const { return m_xtpComInit; << this was nullptr } Why am I getting this issue in v24? Removing the call to "SetTheme()" seems to help, but I haven't been able to verify if the theme is then set correctly.
|
|
rconn
Groupie Joined: 16 May 2007 Location: United States Status: Offline Points: 77 |
Post Options
Thanks(0)
|
Does your app derive from CWinApp or CXTPWinApp? My older ones were using CWinApp (which is what the CJ samples used years ago); when I changed to CXTPWinApp the assert went away.
|
|
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 |