Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Dialog Controls    [ Add a report in this area ]  
Report #:  84005   Status: Need Feedback
Access violation in OpenDialog and SaveDialog on Vista
Project:  Delphi Build #:  11.2
Version:    11.2 Submitted By:   Torbjörn Gerhardsson
Report Type:  Crash / Data loss / Total failure Date Reported:  4/20/2010 2:58:20 AM
Severity:    Commonly encountered problem Last Updated: 4/20/2010 6:12:31 PM
Platform:    32 Bit Internal Tracking #:  
Resolution: Need More Info (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
I have Delphi 2007 (CodeGear? Delphi® 2007 for Win32® R2 Version Access violation )
with the latest updates (December2007Update,May08HelpUpdate,UpdateApril08Hotfix)
but still have problems with Access violation when Using TSaveDialog and TOpenDialog.

The problem is not easily reproducible in a small test project but in a big program
with an exe-file of 8 MB it is randomly, but frequently arising. In a newly started
program when going directly to the SaveDialog part, the Access violation arises
sometimes 0 out of 10, sometimes 3 out of 10, sometimes 5 out of 10. If I let
the program continue after the crash it can be 2, 3 crashes in row and the suddenly
the SaveDialog work ok the 4th time.

The same problem is in the OpenDialog, random crashes.

It always manage to display the dialog, the crash comes after clicking Open, Save
or Cancel.

I have UseLatestCommonDialogs as default (true).

it seems to occur only on Vista and Windows 7, not on XP.

The code part is simply, just some lines:

    SaveDialog1.Filename:=DefSaveName;
    SaveDialog1.InitialDir:=DefPath;
    ModalResult:=MrCancel;
    if SaveDialog1.Execute {<=Randomly crashes with Access violation here} then begin
       ModalResult:=MrOK;
       UseFilenamn:=SaveDialog1.Filename;
    end
    else ModalResult:=MrCancel;

This is what the crash report says:

exception class   : EAccessViolation
exception message : Access violation at address 76E0633E in module 'comdlg32.dll'. Read of address 6D8516C8.

main thread ($17d0):
76e0633e +000 comdlg32.dll
00408184 +010 mabw.exe      System     39  +0 @IntfClear
0049fe9d +4b1 mabw.exe      Dialogs           TCustomFileDialog.Execute
0049dc71 +105 mabw.exe      Dialogs           TFileDialogWrapper.Execute
0049e384 +0a8 mabw.exe      Dialogs           TOpenDialog.DoExecute
0049ea33 +00f mabw.exe      Dialogs           TSaveDialog.Execute
0049d609 +035 mabw.exe      Dialogs           TCommonDialog.Execute
00600157 +2df mabw.exe      Wbsieeva  351 +49 TDLG_EXPORTVAL.IDOKClick

Is it only me having these problems? Or is it only big programs with multimegabyte exefiles?
Steps to Reproduce:
No simple way.
Workarounds
None. Possible UseLatestCommonDialogs=false;
Attachment
None
Comments

Tomohiro Takahashi at 4/20/2010 11:19:23 PM -
> Is it only me having these problems? ...
AFAIK, same issue was reported at "Discussion Forums >>Japanese >> C++ Builder" last year.
https://forums.codegear.com/thread.jspa;jsessionid=0C698125571ACA28BBEA9A2FB53ACC25?messageID=126748

So, if you find a simple way to reproduce your issue, please attach a sample project.

Server Response from: ETNACODE01