Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 Discussions

Common Dialog crash - Access Violation - Shell32.dll - PDFshell.dll

Intel_C_Intel
Employee
2,261 Views
posting this for info & any comments.

while debugging a mdi app that uses the common dialogs
to Open/Save files I encountered a crash with the GetOpenFileName common dialog. It occurs only after the first file has been opened upon subsequent calls to GetOpenFileName.

the error msg. :
Unhnandled exception in mdi_me.exe (SHELL32.DLL):0xC0000005: Access
Violation.

I noticed this only happened after this message was posted in the Debug window:
Loaded 'C:Program FilesAdobeAcrobat 7.0ActiveXpdfshell.dll', no matching symbolic information found.

If I rename the pdfshell.dll (disabling it) I have no more problems.

Has anyone had any problem like this? or know a way I can disable this directory from being included in the build ?
-Many thanks.
0 Kudos
8 Replies
Steven_L_Intel1
Employee
2,261 Views
It's not part of your build - it's a DLL that's registered with the OS to be loaded any time that kind of dialog box is displayed. You would have to uninstall or unregister the PDFshell.dll in order to make it go away. I assume it came as part of Adobe Reader or Acrobat. You may want to see if an update is available from Adobe.
0 Kudos
anthonyrichards
New Contributor III
2,261 Views
It will help ifyou could show the arguments you give for the OPENFILENAME structure on the first call to GETOPENFILENAMEthat succeeds and the second(?) call that fails. What do you select on the first call?
0 Kudos
mark_lund
Beginner
2,261 Views
I also have this problem. It came with Adobe Acrobat 7. It goes away with version 6.
I have built an application with MFC. The application crashes w/o prompting to "send this to microsoft". When debugging, the exception is not on the main application thread, and happens about 1 second after the file dialog is presented. It generally happens the 2nd time the file dialog is called. It will happen with different parameters, and crashes before the user selects stuff in the dialog box.
0 Kudos
anthonyrichards
New Contributor III
2,261 Views
It sounds like a strong complaint to Adobe is called for, since it is their software barging in on the common dialog stuff that causes the problem...
0 Kudos
manfred_wiehler
Beginner
2,261 Views
Hi cmood,
maybe I have a solution for your problem.
Yesterday I had a similar Access Violation Crash with a Common (Print-)Dialog while I tried to print into a PDF file from an MFC-App (Release version).
The crash only occurs with Acrobat 7, not Acrobat 6. After thinking a while about that behavior I found the cause: I used an unnamed document in my App but never noticed this as a bug because Acrobat 6 wasn't so restrictive.
So I used the doc's member function SetTitle () to give it a name. In my app are actually a lot of views and in each view, mostly in UpdateView () or OnDraw (), I added SetTitle () with a "descriptive" name. Bingo! Everything's OK now!
Good luck!
Manfred
0 Kudos
mgipson
Beginner
2,261 Views
I have spent quite some time tracking this exact problem down. In my case I was not calling CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); in my code before using the common controls. That certainly fixed it for me!
0 Kudos
Intel_C_Intel
Employee
2,261 Views
Thank you all for the help. That last suggestion on initializing the com library was the ticket! I ended up using ComInitialize and (so far) no problems with Acrobat 7.
0 Kudos
yuanhui
Beginner
2,261 Views
Ifaced the same problem even I had included the ComInitialize (). I used C++ to code the program. Please help. Thanks.
0 Kudos
Reply