Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: OpenDialog Access Violation


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Last Post: Jun 26, 2016 2:25 PM Last Post By: Remy Lebeau (Te...
Detlef Meyer-Eltz

Posts: 7
Registered: 7/25/00
OpenDialog Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 22, 2016 3:32 AM
On my computer with Windows 10 all my applications that were built with Delphi/C++Builder crash as soon as a FileDialog is opened. That includes not only my own applications but also RAD Studio and third party applications.

When I create a new project with an OnClick event, with "OpenDialog1->Execute()", I get following message:



Benachrichtigung über Debugger-Exception

Im Projekt Project1.exe ist eine Exception der Klasse $C0000005 mit der Meldung 'access violation at 0x0008e080: read of address 0x0008e080' aufgetreten.

Anhalten Fortsetzen Hilfe

On my computer with Windows 10 all my applications that were built with Delphi/C++Builder crash as soon as a FileDialog is opened. That includes not only my own applications but also RAD Studio and third party applications.

When I create a new project with an OnClick event with "OpenDialog1->Execute()", I get following message:


Benachrichtigung über Debugger-Exception

Im Projekt Project1.exe ist eine Exception der Klasse $C0000005 mit der Meldung 'access violation at 0x0008e080: read of address 0x0008e080' aufgetreten.

Anhalten Fortsetzen Hilfe

I made a screenshot with the stack, but it seems that I cannot insert it here. At the top there is an address, followd by three items "comdlg32.dll" and three items "combase.dll" and then TCustomFileOpenDialog@CreateFileDialog$qqrv + 0x3e.

Does anybody have an idea, how I can repair my system?

I'm not sure whether this is the right Forum and topic to ask this question. Perhaps someone can give me a hint, where I can find help.
Detlef Meyer-Eltz

Posts: 7
Registered: 7/25/00
Re: OpenDialog Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 22, 2016 4:48 AM   in response to: Detlef Meyer-Eltz in response to: Detlef Meyer-Eltz
Sorry, it has nothing to do with Delphi/C++Builder. All my file dialogs habe this problem.
Detlef Meyer-Eltz

Posts: 7
Registered: 7/25/00
Re: OpenDialog Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 22, 2016 7:17 AM   in response to: Detlef Meyer-Eltz in response to: Detlef Meyer-Eltz
sfc /scannow and DISM helped
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenDialog Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 22, 2016 10:52 AM   in response to: Detlef Meyer-Eltz in response to: Detlef Meyer-Eltz
Detlef wrote:

Sorry, it has nothing to do with Delphi/C++Builder. All
my file dialogs habe this problem.

You mean in all applications on the entire system?

You probably have a faulty shell extension installed. File dialogs run their
own copies of the Explorer shell, and as such Explorer shell extensions are
loaded in file dialogs. Do you have the same crash when runnig Windows Explorer
itself?

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenDialog Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 22, 2016 10:50 AM   in response to: Detlef Meyer-Eltz in response to: Detlef Meyer-Eltz
Detlef wrote:

I made a screenshot with the stack, but it seems that I cannot insert
it here.

You can post it to the Attachments forum.

At the top there is an address, followd by three items
"comdlg32.dll" and three items "combase.dll" and then
TCustomFileOpenDialog@CreateFileDialog$qqrv + 0x3e.

TCustomFileOpenDialog.CreateFileDialog() creates the actual IFileDialog object
provided by the OS:

function TCustomFileOpenDialog.CreateFileDialog: IFileDialog;
var
  LGuid: TGUID;
begin
{$IF DEFINED(CLR)}
  LGuid := Guid.Create(CLSID_FileOpenDialog);
{$ELSE}
  LGuid := CLSID_FileOpenDialog;
{$IFEND}
  CoCreateInstance(LGuid, nil, CLSCTX_INPROC_SERVER,
    StringToGUID(SID_IFileOpenDialog), Result);
end;


CoCreateInstance() is a Win32 API function, so if that is where the crash
is happening then the crash is happening inside the OS itself, not in the
VCL.

--
Remy Lebeau (TeamB)
Detlef Meyer-Eltz

Posts: 7
Registered: 7/25/00
Re: OpenDialog Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 25, 2016 7:21 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Do you have the same crash when runnig Windows Explorer

Windows Explorer ran without problems. But I'm not aware, that a file dialog can be opened there.

After I ran the Windows repair tools everything went well till today or yesterday. When I closed RA Studio 10 yesterday an exception occurred. I don't know the exact message. It was a text like "exception in ...bpl". When I started C++Builder today following exception occurred

Externe Exception C000001D

and the RAD Studio crashed. I thought this were a good occasion to change to RAD Studio 10.1 and I installed it. At start the same error occurs, however at least RAD Studio don't crash. I tried to send an error report, but there was an error too at the last step.

I also have RAD Studio XE 3 on my computer. This starts without problems.

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenDialog Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 26, 2016 2:25 PM   in response to: Detlef Meyer-Eltz in response to: Detlef Meyer-Eltz
Detlef wrote:

Windows Explorer ran without problems. But I'm not aware,
that a file dialog can be opened there.

My point was that an OpenDialog running in Explorer mode actually hosts a
copy of the Explorer shell inside of it. So any shell extensions being loaded
should also be loaded when the actual Windows Explorer application runs since
it uses the same shell.

--
Remy Lebeau (TeamB)
Alex Belo

Posts: 626
Registered: 10/8/06
Re: OpenDialog Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 22, 2016 10:02 PM   in response to: Detlef Meyer-Eltz in response to: Detlef Meyer-Eltz
Detlef Meyer-Eltz wrote:

On my computer with Windows 10 all my applications that were built
with Delphi/C++Builder crash as soon as a FileDialog is opened

I (and my colleagues too) have the same problem (in debugger only)
since Win7 (never in XP).

As Remy says it looks as bad explorer extention but it also can be
problem in system itself (IMHO)...

--
Alex
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02