Stack Overflow with Windows 2003 Terminal Service |
Post Reply |
Author | |
lemongrass
Groupie Joined: 09 June 2006 Location: Austria Status: Offline Points: 28 |
Post Options
Thanks(0)
Posted: 31 January 2007 at 3:44am |
Hi,
I've a problem when running a skined application on a windows 2003 terminal server. Everytime I try to change a skin, I get an stack overflow at: LRESULT WINAPI CXTPSkinManagerApiHook::OnHookCallWindowProcA(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { PROC pfnOrig = GetOriginalProc(xtpSkinApiCallWindowProcA); if (!pfnOrig) return CallWindowProcA(lpPrevWndFunc, hWnd, Msg, wParam, lParam); giving the following stack-trace: APPL! 007e3256() line 187 + 6 bytes APPL! 007e453f() line 709 + 7 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes APPL! 007e4567() line 711 + 28 bytes . . . --------------------------------------------------------------------------------- all this happens if I try to unload a loaded skin with: XTPSkinManager()->LoadSkin("", ""); as you do it in your demo applications. Any suggestions on this? I'am using 10.40 and 10.42 -> no difference Regards Mario |
|
inforapid
Groupie Joined: 31 March 2006 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Hello,
I have exactly the same problem. With Windows XP, not in a Terminal Session and it occures since version 10.4.2. Version 10.4 works without problems. The stack overflow occures after I call XTPSkinManager()->LoadSkin("", ""); to switch skinning off. The function LRESULT WINAPI CXTPSkinManagerApiHook::OnHookDefFrameProcA(HWND hWnd, HWND hWndMDIClient, UINT Msg, WPARAM wParam, LPARAM lParam) gets called and tries to get the pointer to the original windows procedure. PROC pfnOrig = GetOriginalProc(xtpSkinApiDefFrameProcA); This pointer is NULL, so it calls DefFrameProcA(hWnd, hWndMDIClient, Msg, wParam, lParam); which is equal with OnHookDefFrameProcA, so the function gets called recursive after and after without an end, until the program crashes. Can someone please help us because I can't guess what I'm doing wrong. Kind Regards Ingo |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
We need some sample/project to debug it. Do you see same problem with our samples?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
inforapid
Groupie Joined: 31 March 2006 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Hello Oleg,
Yes, the stack overflow also occures within your SkinMDISample program. The one you have delivered (with dynamically linking MFC and CodeJock libraries) works. But when I change the project settings to statically link the MFC library, the stack overflow occures when I click in the "Skin and Themes" property sheet in the section "Default Skins" on the Default radio button. I am using Visual Studio .Net 2003. If you want to, I can send you a zip archive with the sample program. Kind Regards Ingo |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Ups. thanks. You right. our small bug.
Please patch CXTPSkinManagerApiFunction::ReplaceInAllModules method:
change
ReplaceInOneModule(pszCalleeModName, pfnCurrent, pfnNew, AfxGetInstanceHandle());
to
if (ReplaceInOneModule(pszCalleeModName, pfnCurrent, pfnNew, AfxGetInstanceHandle()))
{ bResult = TRUE; } and recompile library.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
inforapid
Groupie Joined: 31 March 2006 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Hello Oleg,
Works great. Thank You.
Ingo
|
|
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 |