Crash in XTPSkinManagerApiHook.cpp (383) |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 03 February 2008 at 2:08am |
I started my application for the 1000th time and got a crash at line 383 in XTPSkinManagerApiHook.cpp (version 11.2.2, VS 2008, MFC in shared DLL, _XTP_STATIC_LINK defined). I have not been able to reproduce the error. The only thing I remember is that I got a LOT of memory leaks in another DLL and decided to terminate the trace output (Shift+F5), after which I hit F5 immediately. Not sure if that can yield a problem, but still...
pszCalleeModName = "USER32.DLL"
pfnCurrent = 0x7e42f710
pfnNew = 0x0060c963 CXTPSkinManagerApiHook::OnHookSetScrollPos(struct HWND__ *,int,int,int) int (void)*
hmodCaller = 0x77c00000 {unused=??? } HINSTANCE__ * I hope this call stack trace will give you a hint of what's going on:
imagehlp.dll!76c941f4()
[Frames below may be incorrect and/or missing, no symbols loaded for imagehlp.dll] imagehlp.dll!76c941c9() > MyProgram.exe!CXTPSkinManagerApiFunction::ReplaceInOneModule(const char * pszCalleeModName=0x01e9c294, int (void)* pfnCurrent=0x7e42f710, int (void)* pfnNew=0x0060c963, HINSTANCE__ * hmodCaller=0x77c00000) Line 383 + 0x14 bytes C++ MyProgram.exe!CXTPSkinManagerApiFunction::ReplaceInAllModules(const char * pszCalleeModName=0x01e9c294, int (void)* pfnCurrent=0x7e42f710, int (void)* pfnNew=0x0060c963) Line 356 + 0x18 bytes C++ MyProgram.exe!CXTPSkinManagerApiFunction::HookImport() Line 324 + 0x1d bytes C++ MyProgram.exe!CXTPSkinManagerApiHook::AddHook(XTPSkinFrameworkApiFunctionIndex nIndex=xtpSkinApiSetScrollPos, const char * pszCalleeModName=0x00a526c0, const char * pszFuncName=0x00a52890, int (void)* pfnOrig=0x7e42f710, int (void)* pfnHook=0x0060c963) Line 183 C++ MyProgram.exe!CXTPSkinManagerApiHook::HookImport(XTPSkinFrameworkApiFunctionIndex nIndex=xtpSkinApiSetScrollPos, const char * pszCalleeModName=0x00a526c0, const char * pszFuncName=0x00a52890, int (void)* pfnHook=0x0060c963) Line 159 + 0x1c bytes C++ MyProgram.exe!CXTPSkinManagerApiHook::InitializeHookManagement() Line 513 C++ MyProgram.exe!CXTPSkinManager::LoadSkin(const char * lpszResourcePath=0x00000000, const char * lpszIniFileName=0x00a33584) Line 486 C++ MyProgram.exe!CMainFrame::CMainFrame() Line 72 C++ MyProgram.exe!CMyProgramApp::InitInstance() Line 167 + 0x39 bytes C++ mfc90d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f14, int nCmdShow=1) Line 37 + 0xd bytes C++ MyProgram.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f14, int nCmdShow=1) Line 30 C++ MyProgram.exe!__tmainCRTStartup() Line 574 + 0x35 bytes C MyProgram.exe!WinMainCRTStartup() Line 399 C kernel32.dll!7c816fd7() MyProgram.exe!CXTPCommandBars::_GetAddOrRemovePopup(CXTPToolBar * pToolBar=0x85ffecb6, CXTPCommandBar * pExpandBar=0x8b1974c0) Line 1705 + 0x3e bytes C++ d9e80000() |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Happened again! Can you please investigate this?
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Damn. It's becoming more frequent. I hope you are aware of this bug! :/ |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
It seems to happen more often when I do this:
F5, close program. F5, close program...
Perhaps the hook is not correctly uninitialized upon termination?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Please download beta 12.0 and check if you can reproduce it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Unfortunately I get this crash in 12.0 too (at line 414). Though, it is very rare... |
|
xhantt
Newbie Joined: 16 April 2008 Location: Argentina Status: Offline Points: 6 |
Post Options
Thanks(0)
|
I'm experiencing the same problem, it can be related to a call to ImageDirectoryEntryToData from different threads.
In the Remarks section of the MSDN documentation you can read
I've added a critical section guarding this call, so far I don't have experienced the same crash again. |
|
xhantt
Newbie Joined: 16 April 2008 Location: Argentina Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Almost, but I'm now experiencing another crash in the same function but only when is trying to hook mshtml.dll.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Actually in 12.0 we have critical section in - CXTPLockGuard lock(m_pApiHook->m_cs);
You can exclude mshtml.dll. with
XTPSkinManager()->ExcludeModule("mshtml.dll"); // (for 12.0 )
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
xhantt
Newbie Joined: 16 April 2008 Location: Argentina Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Thanks, I'll try to poll our PM to consider an upgrade.
|
|
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 |