I've got an odd problem to do with a CFileDialog object and tooltips I think. The first time the CFileDialog is displayed everything works OK (the files display and the user can select a file to open (and tooltips pop up noting file types and size..). The second time the CFileDialog is displayed, once the user hovers over a filename for less than a second, the program terminates (no message denoting a exception) in the release version. In the debug version there is an exception message.
Unhandled exception in ProNC.exe (SHELL32.DLL): 0xc0000005: Access Violation.
. Looking at the call stack, none of my functions are listed, the last listed one is "SHELL32". If I select the file I want quickly (not allowing tooltips to popup) everything works OK, or if I manually enter the file name in the editbox of the CFileDialog all is OK. No problems on 2000 machine either. I'm using XP Professional SP2 and VC 6.0. Any ideas?
jeron, in addition to what CPPFanatic suggested, could you either post your original project or create test project where you are able to duplicate your problem and post it?
There are only 10 types of people in the world: Those who understand binary and those who do not.
Here is a small app which exhibits the problem. Click on the main button which brings up a CFileDialog box select a file (and click on Open button) CFileDialog closes and all is OK. Click on the main button again, then hover over a particular file so that the tool tip would typically display and the app shuts down without any error (exception) description, like you hit the close button. I tried it on someone elses machine (XP Pro Version 2002 SP1) and (and on a Win2000machine) and it worked OK. I'm using and ACER laptop with XP Pro Version 2002 SP 2 and VC 6.0.
Click on the main button again, then hover over a particular file so that the tool tip would typically display and the app shuts down without any error (exception) description, like you hit the close button. I tried it on someone elses machine (XP Pro Version 2002 SP1) and (and on a Win2000machine) and it worked OK. I'm using and ACER laptop with XP Pro Version 2002 SP 2 and VC 6.0.
Sorry, couldn't repro it on my machine either (XP Pro / SP2). I tried both the debug and release builds, and could open the file dialog multiple times, the tooltips always worked fine. Did you check whether other applications expose the same behaviour on your machine?
This could be due to something else. Possibly one of your shell components got changed by some other update that you might have installed on your machine ??
Thanks for taking the time to try it. I think I'll try not using the CFileDialog class and use API calls (like GetOpenFileName()). Let you know what I find.
Thanks for taking the time to try it. I think I'll try not using the CFileDialog class and use API calls (like GetOpenFileName()). Let you know what I find.
Yes, that would be interesting to narrow down the problem. The CFileDialog wrapper around GetOpenFileName() is not so thin. However, I doubt that it is an MFC problem - I rather suspect some component / defect on your machine which corrupts the behaviour of the common file dialog.
Thanks for taking the time to try it. I think I'll try not using the CFileDialog class and use API calls (like GetOpenFileName()). Let you know what I find.
Hi jeron
I've got a similar problem
Like you, the bug occurs only to a few PC: In my case, it works perfectly on my computer but crash on those of the Test&Release Team.
Unfortunatly due to time constraints I didn't solve it, but I had lots of people try it on thier XP machines at work and no problems were found. At this point I kind of attribute the problem to the a component update like Kirants mentioned. I'm getting a Vista upgrade for it this week, I'll let you know if the problem still exists on that particular machine.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.