This project has moved and is read-only. For the latest updates, please go here.

VS2010 bug - hangs at CFileDialog open

Oct 27, 2011 at 1:40 PM

Dear, VLD developers.

I really thank you for your VLD.

I got a great help from your VLD. and I found 2 bugs that needs your help.

here is bug1.

I am building MFC application with VS2010.

when I open dialog with ID_FILE_OPEN or CFileDialog, my application hangs.

If I made CFileDialog with m_bVistaStyle = FALSE, it works OK.

and if VLD = off, it works normaly.


you can reproduce it.

make default MFC application with VS2010.

then try File / Open

it hangs more than 50%.

here is typical call stack.

I guess, VLD is waiting something

ntdll.dll!_NtWaitForMultipleObjects@20()  + 0x15 bytes 
ntdll.dll!_NtWaitForMultipleObjects@20()  + 0x15 bytes 
kernel32.dll!_WaitForMultipleObjectsExImplementation@20()  + 0x8e bytes 
user32.dll!_RealMsgWaitForMultipleObjectsEx@20()  + 0xe2 bytes 
duser.dll!CoreSC::Wait()  + 0x54 bytes 
duser.dll!CoreSC::xwProcessNL()  + 0x4b8 bytes 
duser.dll!_GetMessageExA@16()  + 0x3d bytes 
duser.dll!ResourceManager::SharedThreadProc()  + 0xb6 bytes 
msvcrt.dll!__endthreadex()  - 0x35 bytes 
msvcrt.dll!__endthreadex()  + 0x6c bytes 
kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes 
ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes 
ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes 


Oct 27, 2011 at 2:06 PM

here is sample.

modify TestVLDforFileDialog.cpp to include vld.h

and build and Run application

try File / Open

If you have vs2010 prof or above,

try File / New / Project

select MFC application in Visual C++ / MFC template

that the same sample that I send to you

--------- 원본 메일 ---------
보낸사람: "KindDragon"<>
받는사람 :
날짜: 27 Oct 2011 05:42:31 -0700
제목: Re: VS2010 bug - hangs at CFileDialog open [vld:277407]

Oct 27, 2011 at 2:08 PM
Edited Oct 27, 2011 at 2:15 PM


 how to attach samples?

Nov 8, 2011 at 1:02 PM
Edited Nov 8, 2011 at 1:02 PM

Hi all,

I had the same experience with CFileDialog and vld on windows 7 (I also tried GetOpenFileName function with the same result - freezing) - I spent two horrible days of my life by solving of this issue.

Please fix vld somehow, it is very useful.

With regards Martin

Jun 26, 2014 at 1:15 AM
It is a pity that a so nice development tool has this bug.. the issue is deep to the WinApi, and thus it involves Qt, MFC, etc. I found the workaround to open a single format/single selection file dialog before anything else. I works almost always.. but it is quite annoying!
Jun 29, 2014 at 10:18 AM