Hi;
I use toolkit 19.3 and I can always reproduce memory leaks in skin framework. See the call stack:
> ucrtbased.dll!heap_alloc_dbg_internal(const unsigned int size, const int block_use, const char * const file_name, const int line_number) Zeile 319 C++ ucrtbased.dll!heap_alloc_dbg(const unsigned int size, const int block_use, const char * const file_name, const int line_number) Zeile 450 C++ ucrtbased.dll!_malloc_dbg(unsigned int size, int block_use, const char * file_name, int line_number) Zeile 495 C++ mfc140ud.dll!operator new(unsigned int nSize, int nType, const char * lpszFileName, int nLine) Zeile 354 C++ mfc140ud.dll!operator new[](unsigned int nSize, int nType, const char * lpszFileName, int nLine) Zeile 386 C++ mfc140ud.dll!operator new[](unsigned int nSize, const char * lpszFileName, int nLine) Zeile 48 C++ mfc140ud.dll!CPlex::Create(CPlex * & pHead, unsigned int nMax, unsigned int cbElement) Zeile 29 C++ ToolkitPro1930vc150UD.dll!CMap<CXTPRWCriticalSection const *,CXTPRWCriticalSection const *,long,long>::NewAssoc(const CXTPRWCriticalSection * key) Zeile 1484 C++ ToolkitPro1930vc150UD.dll!CMap<CXTPRWCriticalSection const *,CXTPRWCriticalSection const *,long,long>::operator[](const CXTPRWCriticalSection * key) Zeile 1597 C++ ToolkitPro1930vc150UD.dll!CXTPRWCriticalSection::IncrementLocalSharedLockCounter() Zeile 317 C++ ToolkitPro1930vc150UD.dll!CXTPRWCriticalSection::LockShared(int bPopMode) Zeile 282 C++ ToolkitPro1930vc150UD.dll!CXTPRWCriticalSection::LockShared() Zeile 170 C++ ToolkitPro1930vc150UD.dll!CXTPRWCriticalSection::CSharedLock::CSharedLock(CXTPRWCriticalSection & cs) Zeile 304 C++ ToolkitPro1930vc150UD.dll!CXTPAsyncGuard<CXTPSkinManager,CXTPRWCriticalSection::CSharedLock>::CXTPAsyncGuard<CXTPSkinManager,CXTPRWCriticalSection::CSharedLock>(CXTPSkinManager & adaptee, CXTPRWCriticalSection & cs) Zeile 430 C++ ToolkitPro1930vc150UD.dll!XTPAccessShared<CXTPSkinManager>(CXTPSkinManager * pObject) Zeile 638 C++ ToolkitPro1930vc150UD.dll!CXTPSkinManagerApiHookBase::CallHookDefWindowProc(HWND__ * hWnd, void * pfnOrig, XTPSkinDefaultProc defProc, void * lpPrev, unsigned int nMessage, unsigned int & wParam, long & lParam, long & lResult) Zeile 222 C++ ToolkitPro1930vc150UD.dll!CXTPSkinManagerDetoursApiHook::OnHookCallWindowProcW(long(__stdcall*)(HWND__ *, unsigned int, unsigned int, long) lpPrevWndFunc, HWND__ * hWnd, unsigned int Msg, unsigned int wParam, long lParam) Zeile 899 C++ mfc140ud.dll!CWnd::DefWindowProcW(unsigned int nMsg, unsigned int wParam, long lParam) Zeile 1100 C++ mfc140ud.dll!CWnd::WindowProc(unsigned int message, unsigned int wParam, long lParam) Zeile 2100 C++ ToolkitPro1930vc150UD.dll!CXTPTabClientWnd::WindowProc(unsigned int message, unsigned int wParam, long lParam) Zeile 2407 C++ mfc140ud.dll!AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned int wParam, long lParam) Zeile 265 C++ mfc140ud.dll!AfxWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned int wParam, long lParam) Zeile 418 C++ mfc140ud.dll!AfxWndProcBase(HWND__ * hWnd, unsigned int nMsg, unsigned int wParam, long lParam) Zeile 299 C++ user32.dll!__InternalCallWinProc@20() Unbekannt user32.dll!UserCallWinProcCheckWow() Unbekannt user32.dll!DispatchClientMessage() Unbekannt user32.dll!___fnOPTOUTLPDWORDOPTOUTLPDWORD@4() Unbekannt ntdll.dll!_KiUserCallbackDispatcher@12() Unbekannt user32.dll!SendMessageW() Unbekannt mfc140ud.dll!CMDIFrameWnd::MDIGetActive(int * pbMaximized) Zeile 320 C++ mfc140ud.dll!CMDIFrameWnd::OnCmdMsg(unsigned int nID, int nCode, void * pExtra, AFX_CMDHANDLERINFO * pHandlerInfo) Zeile 67 C++ ToolkitPro1930vc150UD.dll!CXTPMDIFrameWnd::OnCmdMsg(unsigned int nID, int nCode, void * pExtra, AFX_CMDHANDLERINFO * pHandlerInfo) Zeile 98 C++ XRVisualizer.exe!CMainFrame::OnCmdMsg(unsigned int nID, int nCode, void * pExtra, AFX_CMDHANDLERINFO * pHandlerInfo) Zeile 1629 C++ mfc140ud.dll!CCmdUI::DoUpdate(CCmdTarget * pTarget, int bDisableIfNoHndler) Zeile 764 C++ ToolkitPro1930vc150UD.dll!CXTPCommandBar::CCommandBarCmdUI::DoUpdate(CCmdTarget * pTarget, int bDisableIfNoHandler) Zeile 745 C++ ToolkitPro1930vc150UD.dll!CXTPCommandBar::OnUpdateCmdUI() Zeile 872 C++ ToolkitPro1930vc150UD.dll!CXTPCommandBar::OnIdleUpdateCmdUI(unsigned int __formal, long __formal) Zeile 670 C++ mfc140ud.dll!CWnd::OnWndMsg(unsigned int message, unsigned int wParam, long lParam, long * pResult) Zeile 2441 C++ ToolkitPro1930vc150UD.dll!CXTPCommandBar::OnWndMsg(unsigned int message, unsigned int wParam, long lParam, long * pResult) Zeile 2635 C++ mfc140ud.dll!CWnd::WindowProc(unsigned int message, unsigned int wParam, long lParam) Zeile 2099 C++ mfc140ud.dll!AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned int wParam, long lParam) Zeile 265 C++ mfc140ud.dll!CWnd::SendMessageToDescendants(HWND__ * hWnd, unsigned int message, unsigned int wParam, long lParam, int bDeep, int bOnlyPerm) Zeile 3025 C++ mfc140ud.dll!CWnd::SendMessageToDescendants(HWND__ * hWnd, unsigned int message, unsigned int wParam, long lParam, int bDeep, int bOnlyPerm) Zeile 3036 C++ mfc140ud.dll!CWnd::SendMessageToDescendants(unsigned int message, unsigned int wParam, long lParam, int bDeep, int bOnlyPerm) Zeile 130 C++ mfc140ud.dll!CWinThread::OnIdle(long lCount) Zeile 680 C++ mfc140ud.dll!CWinApp::OnIdle(long lCount) Zeile 1050 C++ XRVisualizer.exe!CXRVisualizerApp::OnIdle(long lCount) Zeile 3309 C++ mfc140ud.dll!CWinThread::Run() Zeile 621 C++ mfc140ud.dll!CWinApp::Run() Zeile 787 C++ XRVisualizer.exe!AfxWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Zeile 101 C++ XRVisualizer.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Zeile 26 C++ XRVisualizer.exe!invoke_main() Zeile 123 C++ XRVisualizer.exe!__scrt_common_main_seh() Zeile 288 C++ XRVisualizer.exe!__scrt_common_main() Zeile 331 C++ XRVisualizer.exe!wWinMainCRTStartup() Zeile 17 C++ kernel32.dll!@BaseThreadInitThunk@12() Unbekannt ntdll.dll!__RtlUserThreadStart() Unbekannt ntdll.dll!__RtlUserThreadStart@8() Unbekannt
How can we solve this? What leads to this memory leak. The longer the app is executed the higher the leaked memory.
------------- Martin
Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022
|