Question

I have this legacy application which I've been trying to get up and running.

It has some dependencies on an old DirectX SDK version which can only be installed on WinXP (or prior) so I used a virtual machine of mine and successfully built the application. However, due to limitations of the virtual graphics hardware the application is not rendering its graphics correctly, but that was just expected. The rest of the application (UI-interaction and such) seems to work just fine on the virtual machine (32-bit Windows XP).

When I try to to run the applcation on my physical machine, 64-bit Windows 7, it hangs in an early state. I used some debug output to track down exactly where it hangs, and it's when CDialog::Create is called for creating a modeless dialog.

I finally tried to start it on my laptop, 32-bit Windows 8.1, and it worked. I'm thinking that it should have something to do with x86 vs x64, but of course I cannot be sure.

Has anyone come across something similar? I've googled a lot on CDialog::Create hanging, and found some interesting threads, but everything looks correct in code, and well, it runs, but only on 32-bit machines.

Update:

I managed to build the application in VS2010 by removing a bunch of code. When I debug the application the callstack shows that it hangs on the CreateDialogIndirect call in CWnd::CreateDlgIndirect.

I found a thread regarding this, but it didn't solve anything, AfxOleInit is being called.

This discussion sounds more interesting but I haven't gotten around to try the proposed solution yet.

Update 2:

Setting the DEP to AlwaysOff didn't change anything.

The complete call-stack looks like this:

ntdll.dll!_NtDelayExecution@8()  + 0x15 bytes   
ntdll.dll!_NtDelayExecution@8()  + 0x15 bytes   
KernelBase.dll!_Sleep@4()  + 0xf bytes  
nvoglv32.dll!6955244d()     
[Frames below may be incorrect and/or missing, no symbols loaded for nvoglv32.dll]  
nvoglv32.dll!68e3e2e7()     
nvoglv32.dll!6954d2ad()     
nvoglv32.dll!6954d37c()     
user32.dll!_DispatchHookA@16()  + 0x56 bytes    
user32.dll!_fnHkINLPCWPSTRUCTA@24()  + 0x66 bytes   
user32.dll!___fnINLPCREATESTRUCT@4()  + 0x68 bytes  
ntdll.dll!_KiUserCallbackDispatcher@12()  + 0x2e bytes  
user32.dll!_NtUserCreateWindowEx@60()  + 0x15 bytes 
user32.dll!_VerNtUserCreateWindowEx@52()  + 0x18a bytes 
user32.dll!_InternalCreateDialog@28()  + 0x42a bytes    
user32.dll!_CreateDialogIndirectParamAorW@24()  + 0x33 bytes    
user32.dll!_CreateDialogIndirectParamA@20()  + 0x1b bytes    
Viewer.exe!CWnd::CreateDlgIndirect(const DLGTEMPLATE * lpDialogTemplate, CWnd * pParentWnd, HINSTANCE__ * hInst)  Line 370  C++
Viewer.exe!CDialog::CreateIndirect(const DLGTEMPLATE * lpDialogTemplate, CWnd * pParentWnd, void * lpDialogInit, HINSTANCE__ * hInst)  Line 262 + 0x17 bytes    C++
Viewer.exe!CDialog::CreateIndirect(void * hDialogTemplate, CWnd * pParentWnd, HINSTANCE__ * hInst)  Line 240 + 0x10 bytes   C++
Viewer.exe!CDialog::Create(const char * lpszTemplateName, CWnd * pParentWnd)  Line 223  C++
Viewer.exe!CToolDialog::CreateModeless(CWnd * pParent)  Line 41  
Viewer.exe!CMainFrame::CreateTools()  Line 176 + 0x17 bytes C++
Viewer.exe!CViewerApp::OnIdle(long lCount)  Line 1293   C++
Viewer.exe!CWinThread::Run()  Line 621 + 0xa bytes  C++
Viewer.exe!AfxWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow)  Line 47 + 0x7 bytes    C++ 
Viewer.exe!__tmainCRTStartup()  Line 275 + 0x1c bytes   C
kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes    
ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes   
ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes

Update 3

The application is usually started using a C# launcher application (to be able to select user profiles and other startup settings) and starting it this way it hangs. Also, starting it from the file explorer (or command prompt) it hangs. BUT, if I start it directly from VS2010 using F5, it runs...

SOLVED

I updated my graphics driver, and everything works great.

Was it helpful?

Solution

I updated my graphics driver, and everything works great.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top